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



John Leaman/DPS wrote:
> ...
> 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.
> 

John, you're partially right.  If you are passing UDATE or *DATE as
parameters, you should definitely code the DATEDIT keyword in your H
spec, and for RPG III you should code the stuff in the udate-related
columns (19-21?).  This is true for any combination of RPG III and RPG
IV programs calling each other, not just the mixed case.

But RPG IV doesn't handle UDATE and *DATE like true date data types. 
The UDATE and *DATE format is only dependant on the H spec DATEDIT.  If
DATEDIT isn't specified, UDATE is *MDY and *DATE is *USA.


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.