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



Dan Bale wrote:
>
> NOTE:  This is v3r2 RPG-IV; the TIME op code requires a numeric result
> field.
>
> I need to retrieve the current date (NOT job date) in an RPG-IV program
> compiled at v3r2 and end up storing that date in YYYYMMDD format.

Just for the record, there is a way to use V3R2 RPG coding for this:

D             ds
D timeres              12s 0
D   timedate            6s 0  overlay(timeres : 7)
D tempdate    d          d    datfmt(*iso)

c              time            timeres
c   *jobrun    movel  timedate tempdate
c   *iso       movel  tempdate yyyymmdd    8 0

Important points:
1. You must use the 12-digit form of the TIME result.  *jobrun refers to
the job date format which uses 2-digit years.
2. You must use MOVEL, in case the job format is *JUL.




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.