hello,
I am trying to print the time of the process only as HH:MM.
every reference in the manual I found include HH:MM:SS at least.
I need to include the time in HH:MM format in a header for a file.
I found several time related formats on table 35 Run-time constants on Page 2-167 on manual
however, none of them is what I am looking for.
is there a way to get the time in a desired format (HH:MM)
thank you Sergeyken
I wish this was more straighforward:
Syncsort didn't like the fix:
I executed the code with the standard &date and &time
worked fine.
then I executed again with the suggested &time2 and that upset the &date parm.
trying to figure out what is wrong now
Code:
SYSIN :
DEBUG NOABEND
OMIT COND=((01,8,EQ,C'PROCESS '),OR,(1,07,EQ,C'SYSPLEX')),FO
SORT FIELDS=(1,335,A),FORMAT=CH
SUM FIELDS=NONE
OUTFIL REMOVECC,
HEADER1=(01:'PROCESS STARTED AT ',
20:&DATE(MD4/),
*
31:&TIME2(:),/,
01:'SYSPLEX|RESOURCE TYPE|RESOURCE',
31:'|GROUP/ID|ACCESS ID|ACCESS|'),
TRAILER1=(01:'PROCESS COMPLETED AT ',
22:&DATE(MD4/),33:&TIME)
OUTREC IFTHEN=(WHEN=(293,7,BI,EQ,MN,AND,300,1,CH,NE,C'*'),
OVERLAY=(276:C'USER |',293,8,C' ')),
IFTHEN=(WHEN=(293,7,BI,EQ,MN,AND,300,1,CH,EQ,C'*'),
OVERLAY=(276:C'USER |',293,7,C' '))
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A OUTFIL STATEMENT : SYNTAX ERROR
the problem is that it does work with the straight &time parm.
it doesn't work with &time2
is &time2 only for outrec?
look at this code below. I executed before making the change to &time2.
it does work fine.
cross posting in mainframe forum
thanks for your time, Sergeyken
Code:
SYSIN :
DEBUG NOABEND
OMIT COND=((01,8,EQ,C'PROCESS '),OR,(1,07,EQ,C'SYSPLEX')),FORMAT=CH
SORT FIELDS=(1,335,A),FORMAT=CH
SUM FIELDS=NONE
OUTFIL REMOVECC,
HEADER1=(01:'PROCESS STARTED AT ',
20:&DATE(MD4/),
31:&TIME,/,
01:'SYSPLEX|RESOURCE TYPE|RESOURCE',
31:'|GROUP/|PLATFORM'),
TRAILER1=(01:'PROCESS COMPLETED AT ',
22:&DATE(MD4/),33:&TIME)
OUTREC IFTHEN=(WHEN=(293,7,BI,EQ,MN,AND,300,1,CH,NE,C'*'),
OVERLAY=(276:C'USER |',293,8,C' ')),
IFTHEN=(WHEN=(293,7,BI,EQ,MN,AND,300,1,CH,EQ,C'*'),
OVERLAY=(276:C'USER |',293,7,C' '))
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 8170060, 10764778, 10764778, 19858215
WER164B 24,592K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 24,544K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 600; BLKSIZE= 27600
WER073I SORTIN : DSNAME=SYS22125.T084534.RA000.MSDCSDTD.CSDBACL.H0C
WER237I OUTREC RECORD LENGTH = 600
WER110I SORTOUT : RECFM=FB ; LRECL= 600; BLKSIZE= 27600
WER074I SORTOUT : DSNAME=ZA2T.NDM.ACF2.ACL.DEV.MAY03
WER410B 23,564K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER410B 0 BYTES RESERVE REQUESTED, 23,560K BYTES USED
WER036B G=3368,B=88,BIAS=30
WER045C END SORT PHASE
WER531I ESTR=35,NSTR=91
WER055I INSERT 0, DELETE 15910
WER418I DATASPACE(S) AND/OR ZSPACE USED
WER405I SORTOUT : DATA RECORDS OUT 412293; TOTAL RECORDS OUT 412296
WER493I ZIIP PROCESSOR USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTIN : EXCP'S=36,UNIT=3390,DEV=38CB,CHP=(40414243454647,1),VOL=1SS#A#
WER416B OUTFIL WAS USED FOR SORTOUT
WER246I FILESIZE 256,920,000 BYTES
WER054I RCD IN 428203, OUT 412293
WER072I EQUALS, BALANCE IN EFFECT
WER169I RELEASE 3.1 BATCH 0541 TPF LEVEL 4.0
NOPE...
didn't like it either.
perhaps &date1 & &time2 work only on INREC/OUTREC statements but not on Header
this time it move the error to the top of the header line
Code:
SYSIN :
DEBUG NOABEND
OMIT COND=((01,8,EQ,C'PROCESS '),OR,(1,07,EQ,C'SYSPLEX')),FO
SORT FIELDS=(1,335,A),FORMAT=CH
SUM FIELDS=NONE
OUTFIL REMOVECC,
HEADER1=(01:'PROCESS STARTED AT ',
*
20:&DATE1(/),
31:&TIME2(:),/,
01:'SYSPLEX|RESOURCE TYPE|RESOURCE',
31:'|GROUP/ID|PLATFORM|'),
TRAILER1=(01:'PROCESS COMPLETED AT ',
22:&DATE(MD4/),33:&TIME)
OUTREC IFTHEN=(WHEN=(293,7,BI,EQ,MN,AND,300,1,CH,NE,C'*'),
OVERLAY=(276:C'USER |',293,8,C' ')),
IFTHEN=(WHEN=(293,7,BI,EQ,MN,AND,300,1,CH,EQ,C'*'),
OVERLAY=(276:C'USER |',293,7,C' '))
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE