|
Very nice, Joel. I like Charles' solution, but I like this one, too. RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> writes: >This was a real stretch for me (going back to fixed-format), but here is >what I came up with: > >d testDate s d inz > >c monitor >c if PRMFMT = '*YYMD' >c eval testDate = %date( PRMSDT : *ISO ) >c eval testDate = %date( PRMEDT : *ISO ) >c elseif PRMFMT = '*MDYY' >c eval testDate = %date( PRMSDT : *USA ) >c eval testDate = %date( PRMEDT : *USA ) >c endif >c on-error >c eval PRMERR = *ON >c endmon > >This solution ends up at 11 lines and a new variable. Of course, the >number of lines doesn't really matter, but it is comparable to the 9 you >mentioned before. Mike Naughton Senior Programmer/Analyst Judd Wire, Inc. 124 Turnpike Road Turners Falls, MA 01376 413-863-4357 x444 mnaughton@xxxxxxxxxxxx
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.