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



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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.