|
There is no error code on the Move - you would normally use Test instead to check for the validity of a date, but since you have an L-type field that is not required. This should be about right (not tested and columns not correct) C If DateFld <> *LoVal C Move DateFld MDYDate C Else C Move *LoVal MDYDate C EndIF If you are at V4R2 or later, you would define MDYDate as an L type in the display DDS and use the MAPVAL keyword to map the field's LoVal (01/01/40) to blanks. If you are not yet on V4R2 then the definition of MDYDate should be an 8 char field and the code changes to: C If DateFld <> *LoVal C *MDY Move DateFld MDYDate C Else C Move *Blanks MDYDate C EndIF Not that this only works for dates in the range that an MDY field can handle i.e. 01/01/40 to 12/31/39. If you need to go outside this range either use all four digits of the year on the display or play silly games in the code to "lose" the century digits. +--- | 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-2025 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.