• Subject: Dates and prompt override program
  • From: "Goodbar, Loyd (AFS-Water Valley)" <LGoodbar@xxxxxxxxxxxxxx>
  • Date: Thu, 1 Oct 1998 16:25:56 -0400

I have a data area in which I store a date, in CYYMMDD format (the same
that IBM uses to pass dates in commands). I have a command using a
prompt override program, in which I retrieve the data area and return it
to the command. The date in the command is defined as *DATE.

Data area contains date 0980705 (for instance: 5 Jul 1998)

Here is what happens:
when I have CVTDAT DATE(&DDATE) TOVAR(&RTNDATE) FROMFMT(*CYMD)
TOFMT(*MDY) TOSEP(/)
the command receives '07/05/98'
and the command processing program receives '0980705' as the date data.

But if I have CVTDAT DATE(&DDATE) TOVAR(&RTNDATE) FROMFMT(*CYMD)
TOFMT(*MDYY) TOSEP(/)
(notice TOFMT(*MDYY) vs (*MDY))
the command receives '07/05/1998'
and the command processing program receives '1190705' as the date data.

In both instances I am prompting the command, to make the POP run.

Is this normal, working as designed? Obviously I can only use the first
method if I want the cpp to run correctly. The only reason I noticed
this is because I originally wanted the command date to by CCYY instead
of YY.

Thanks,
Loyd Goodbar

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.