|
Sounds like you are trying to get from New York to Boston by way of LA. You can compile your RPGII program as type RPG (RPGIII) and still run it in the S36 environment. You have access to all the expanded functionality and of course the same restrictions (you cannot have a program open and create a file, etc.) Give it a try. Tommy Briggs -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Douglas Handy Sent: Saturday, September 25, 2004 3:37 PM To: RPG programming on the AS400 / iSeries Subject: Re: still can't get INFDS working.. ##@%%#%@% Eduard, > Something like this? > D DSPINF DS > D @CSR 370 371B 0 That works in RPG III but not RPG II, which does not allow DS subfields to be declard as packed or binary (only character or zoned decimal). You either need to treat it as character data and TESTB to convert to binary, or as Alan mentioned, you can use CALL to pass the character bytes in pos 370-371 to an external program (in RPG III or RPG IV) which can readily convert it to decimal and pass it back. Using CALL/PARM for numeric values between RPG II and RPG III (or IV) needs special attention to the fact the that by RPG II variables are stored in zoned decimal format and RPG III expects them in packed decimal format. So if you name a numeric field in a PARM statement in a RPG II program, it will get passed to the called program (or recieved from the called program) as zoned decimal. I suppose the simplest way to accomplish that these days is using a RPG IV subprogram with a prototype instead of a *ENTRY PLIST, so that the decimal field can be declared as zoned. Doug -- 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 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.