|
The following command: CMD PROMPT('Pass in a date') PARM KWD(DATE) TYPE(*DATE) PROMPT('A valid date') and RPG program: diso s d C *entry plist C parm cymd 7 C *cymd0 move cymd iso c iso dsply C move '1' *inlr C return should do the trick. Note that Command Analyzer converts both 2-digit and 4-digit Dates to a common CYMD format when passing the Date to the CPP. Bruce Vining > >I'm starting to experiment with RPG IV's date data types, and have a >question. I read about the DATFMT keyword on the H-spec, and that's >fine. > >I will be sending a date from a command (6 or 8 char) through to a CL >then to RPG IV. In RPG IV I want to use that passed date as date data. >Do I just create a date variable, then move the passed variable to it? >Does it matter that it's character rather than numeric? > +--- | 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 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.