× 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.



I agree....

Note that the S in the FLD3 definition allows FD3 to contain either negative or positive numerics.

FLD1 and FLD2 will contain only positive numerics

Is your input data in AS4100 / EBCDIC format?


Regards,
John McKay mba
www.rpglanguage.com

----- Original Message ----- From: "Aaron Bartell" <aaronbartell@xxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Saturday, November 08, 2008 10:03 PM
Subject: COBOL to RPG - is this right


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
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.