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



hi charles,

<snip>
Now the question: we know that the RPG III program has worked in the past
when invalid data was passed to CADATE, we don't understand why it would
have failed as an RPG IV program; particularly when the fix was to change
P@ERR to 3 chars and the comparison to '000'.  Unless the mismatch in the
parameters had a different effect with an RPG III <--> RPG IV call than 
they
did with a RPG IV <--> RPG IV call.  It almost seems as if the RPG III 
P@ERR
ended up with the rightmost char and the RPG IV P@ERR ended up with the
leftmost (as I would expect).

I put together a small RPG III program to test, and it works as you would
expect the 1 char P@ERR ends up with the leftmost char.
<snip>

not sure if this will solve your problem or still applies, but it's 
something i encountered a few years ago (V4R4) when mixing RPG III and RPG 
IV pgms

in the absence of detailed info, i will have to make a couple of 
assumptions:
1) CADATE is RPG III
2) CADATE uses system date variables such as UDATE, UDAY, etc  with a name 
like CADATE, seems like a reasonable assumption.

when using RPG IV pgms to call RPG III, you must include  the following 
parameters in your RPG IV H spec:
DatEdit(*MDY) DatFmt(*MDY)     (use *DMY if you are on a DMY 
machine......) 

unless you do this, system date variables such as UDATE, etc will not be 
correct in the called RPG III pgm

not sure how accurate the following explanation is but this is how i 
rationalize it. RPG IV pgms internally store dates in *ISO format unless 
otherwise specified via DatFmt.  i suspect the RPG IV just passes system 
parms such as job date to the called pgms using its internal format. the 
RPG III just assumes the system date will be in the format it expects (eg 
MDY) so passing a  *ISO date to an RPG III pgm is not going to work unless 
you test the pgm on Apr 04 of 2004.  the DatEdit and DatFmt combination is 
required for the RPG IV pgm to pass job date formatted correctly for the 
RPG III pgm.

hope this helps
john
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.