× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Aaron,

The COBOL definitions are at level 03, implying that they are within (at
least) a level 01 definition. Your RPG definitions are for standalone
fields, which are like level 77 definitions in COBOL. If the COBOL
program makes use of the level 01 (or 02) field, then you may find it
useful to translate this to an RPG data structure.

<aside>
It is oh-so-long since I worked in COBOL. When I started programming in
RPG, I had quite a lot of difficulty coming to terms with all the
arbitrary magic in the language: indicators 1P, LR, Hn, Ka, ...; files
that open and close themselves; the cycle. Writing this message reminds
me that level 77 and level 88 are pretty arbitrary, too.
</aside>

Cheers,
Terry.


On Sat, 2008-11-08 at 16:03 -0600, Aaron Bartell wrote:
So I am doing a project where I am reading a record that has a single
column with a whole bunch of data. The need is to read the record and
then place a data structure over it after I learn what type of record
it is by reading the first character in the column. That's all fine
and dandy but the documentation I received that describes the data is
COBOL data structures. I have found a comparison chart of RPG to
COBOL for data types, but I would like input to see if I actually have
the conversion correct. Are the below corresponding fields right?
And if not could somebody pitty this poor COBOL dimwit and give me the
right definitions? :-)

COBOL
03 FLD1 PIC 9V9(8).
03 FLD2 PIC 9(8)V9(10)
03 FLD3 PIC S9(15)V999

RPG
D FLD1 S 9S 8
D FLD2 S 18S 10
D FLD3 S 18S 3


Thanks,
Aaron Bartell
http://mowyourlawn.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.