And a little more complex example. Haven't run this in a long time, not sure
it's correct.
ceetest2 CEEENTRY PPA=mainppa,BASE=11,AUTO=DSA_SIZE
*
TIME DEC,ZONE=GMT
ST R0,TIMEGMT
ST R1,DATEGMT
TIME DEC,ZONE=LT
ST R0,TIMELOC
ST R1,DATELOC
*
CALL TIME,NULL time_t time(NULL)
ST R15,CurTimeT
*
CALL PUTS,LEGENDSTR, +
MF=(E,arglist)
*
CALL GMTIME,CurTimeT, struct tm *gmtime(time_t *) +
MF=(E,arglist)
ST R15,CurTimeTM
LR R2,R15
CALL ASCTIME,((R2)), char *asctime(strcut tm *) +
MF=(E,arglist)
ST R15,CharTime
LR R2,R15
L R3,TIMEGMT
L R4,DATEGMT
CALL PRINTF, +
(GMTSTR,(R4),(R3),(R2)), +
MF=(E,arglist)
*
CALL LOCALTIM,CurTimeT, +
MF=(E,arglist)
ST R15,CurTimeTM
LR R2,R15
CALL ASCTIME,((R2)), char *asctime(strcut tm *) +
MF=(E,arglist)
ST R15,CharTime
LR R2,R15
L R3,TIMELOC
L R4,DATELOC
CALL PRINTF, +
(LOCSTR,(R4),(R3),(R2)), +
MF=(E,arglist)
*
CEETERM RC=0
*
LEGENDSTR DC C'TIME Macro CCYYDDDf HHMMSSth C Runtine'
DC X'1500'
GMTSTR DC C' ZONE=GMT %08x %08x gmtime(): %s'
DC X'00'
LOCSTR DC C' ZONE=LT %08x %08x localtime(): %s'
DC X'00'
*
NULL DC A(0)
*
mainppa CEEPPA ,
*
EJECT ,
*
CEEDSA ,
*
arglist DS 5A
*
DATEGMT DS F
TIMEGMT DS F
DATELOC DS F
TIMELOC DS F
*
CurTimeT DS F time_t
CurTimeTM DS A *(struct tm)
CharTime DS A *(char)
*
*
DSA_SIZE EQU *-CEEDSA
*
CEECAA ,
*
YREGS
*
END ceetest2