Re: Hexadecimal Input Files



On 26 Jun 2006 07:23:43 -0700, "Stacy Kay" <stacykw85@xxxxxxxxxxx>
enlightened us:

I guess I didn't give enough information. I am an intern this summer. I
have already finished a program in Assembler. What my task is, is to
convert that program to COBOL. I have had two semesters of COBOL class
experience. The format of the input file I am to use is in
hexadecimal. I just haven't had this experience before with this
format. I've read it before in a JCL dump, but just haven't used it.
Also, I am working on a mainframe environment. I didn't want to have
someone do my work. I just wanted ideas or even just information about
the relationship between COBOL using hexadecimal numbers. I've looked
in some of my mentor's manuals, but nothing goes too deep on this
subject.


If this is the same file you read into your Assembler program then
your task, as far defining the data in the file, is pretty simple. If
you defined a field in the file in the Assembler program as

FIELDA DS CL10

Then in Cobol it would be:

FIELDA PIC X(10).

Also, if you defined a field as:

FIELDB DS PL5

You might define it in Cobol as

FIELDB PIC 9(9) COMP-3 or
FIELDB PIC 9(7)V99 COMP-3.

And finally, by way of example, if you had a field in the Assembler
program defined as:

FIELDC DS XL4

It may be defined in Cobol as:

FIELDC PIC 9(8) COMP

I hope that helps.



docdwarf@xxxxxxxxx wrote:
In article <1151326592.466740.58500@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Stacy Kay <stacykw85@xxxxxxxxxxx> wrote:
I'm currently trying to do a project that uses a Hexadecimal input
file.

Most data I have run across over the past few decades have been in a
format reducible to hexadecimal... it might be that others would be able
to make a similar statement.

From what I've heard, COBOL does not like this format.

This indicates a lack of familiarity with COBOL on your part... is this
indication reflected in your experience?

I have
to do calculations with this input. I'm not sure how to go about
using this input file.

It should be used in accordance with the specifications you were given,
said specs to include the file's format.

How should I declare the input file?

Platform and compiler information might make this question more readily
answered.

Do I need
to some how convert the file to a different format within the program?
Please list any ideas regarding a hexadecimal input file.

My first idea is 'Show what you have already done, so that work is not
repeated and mistakes not perpetuated.'

My second idea is 'Do your own job/homework'... and if this is your job my
third idea is 'Tell Management that your skill-set is not equal to the
task being assigned.'

DD

Regards,
////
(o o)
-oOO--(_)--OOo-


SAM: "What's new Normie?"
NORM: "Terrorists, Sam. They've taken over my stomach and they're
demanding beer."
From the US TV Sitcom, "Cheers"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve
.



Relevant Pages

  • Re: Linux zSeries questions
    ... None of the kids want to learn Cobol or Assembler. ... Subject: Linux zSeries questions ... support in the say 20 year time frame. ...
    (bit.listserv.ibm-main)
  • Re: Hexadecimal Input Files
    ... have already finished a program in Assembler. ... I have had two semesters of COBOL class ... The format of the input file I am to use is in ... using this input file. ...
    (comp.lang.cobol)
  • Re: Hexadecimal Input Files
    ... COBOL does not like this format. ... to do calculations with this input. ... assembler layout for the file or a cobol FD. ...
    (comp.lang.cobol)
  • Re: Book of Judas (was Re: Any comments ...)
    ... The Gospel of Aloysius the Cobbler was translated from the original JOVIAL, through Pascal, into COBOL. ... The details of the life of Aloysius the Cobbler are obscure (and subject to much conjecture in Assembler and PL/1 by various whisky Priests of Procedure) but he is believed to have decided that there was no money in making shoes by hand, as everyone was making sandals out of old car tyres, and far too stoned to be doing any serious walking anyway. ... After a torrid love affair with a punch girl named Julie, he smoked a few joints, dropped some acid, and received the divine revelation that programming should be removed from the machine. ...
    (comp.lang.cobol)
  • Re: OO in Batch (Was: Program ID)
    ... the Intel platform and the mainframe. ... on the cost of a COBOL compiler. ... > Assembler does not take 3x the time to write that most people think, ... But there is a lot more "baggage" to Assembler programming ...
    (comp.lang.cobol)