|
I am not sure if the job date format is part of the locale. Judging by CHGUSRPRF ... the SETJOBATR does not seem to reference the date format. It does affect things like time separator, etc. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 10/07/2004 02:54 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Fax to Subject Re: System Date Problem On Thu, 7 Oct 2004 rob@xxxxxxxxx wrote: > - CHGJOB - coding required, but not too much. Could be part of "Initial > program to call". The display on WRKSYSVAL QDATFMT says that the job date > format does default from QDATFMT. The date format specified with CHGJOB will not affect the format of the system value QDATE, it'll only affect the job date. (The original poster referenced QDATE) > - Submit a DCR to get job date format as part of the job description. Isn't the date format part of the locale? In other words, by specifying a different locale in the user profile, he'd get the correct format without needing the DCR, wouldn't he? Doesn't matter much since he's using QDATE instead of the job date, so changing the format of the job date doesn't help. Ulimately, unless he wants to use an LPAR, I think he's out of luck. He's going to have to change his code -- hopefully this time he'll write his programs to NOT just assume that the date is in a particular format!! If he needs to guarantee that the date is in a particular format, just do a CVTDAT after the RTVSYSVAL For example, if you want to retrieve a date and have the results always in YMD format, no matter what the system values are set to, you could do this: RTVSYSVAL SYSVAL(QDATE) RTNVAR(&MYDATE) CVTDAT DATE(&MYDATE) TOVAR(&YMDFMT) FROMFMT(*SYSVAL) TOFMT(*YMD) + TOSEP(*NONE) That way, you don't have to write programs that just assume that the system date will be in a particular format! -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.