|
Did you comment the data structure?Yes
How about, just to see where the problem lies:In Debug:
D TestField s 10A
C eval TestField = '01'
+ '06'
+ '20'
+ '15'
C eval DTEOFHIRE = %date(TestField: *usa0)
C eval DTEOFHIRE = %date(('01'
+ '06'
+ '20'
+ '15'): *usa0)
C eval DTEOFHIRE = %date(%char(X)
C + %char(EmpDay2)
C + %char(EmpCentury)
C + %char(EmpYear2): *usa0)
From the first Eval DTEOFHIRE. I didn't expect the slashes since it has *usa0 but itdid work.
I would expect a result of "01/06/2015". Then, during debug, you may
see where it fails.
Two things: I messed up with mdy0; also, I am not sure where the %date
bif was in v5r3.
On 1/5/2015 10:29 PM, Gary Kuznitz wrote:
Thank you very much for the suggestions
statement in the
In Debug mode:
X = 01.
EMPDAY2 = 15.
EMPCENTURY = 20.
DTEOFHIRE = '01/01/0001'
I modified it slightly and tried this code:
C eval DTEOFHIRE = %date(%char(X)
C + %char(EmpDay2)
C + %char(EmpCentury)
C + %char(EmpYear2): *mdy0)
EMPYEAR2 = 01.
I get the same error.
The only thing I can think that I might be doing wrong is I have this H
program:--
H OPTION(*SRCSTMT : *NODEBUGIO)DATFMT(*USA)
Thanks,
Gary
This is the RPG programming on the IBM i (AS/400 and 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-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.