Minoru Massaki at IBM Mainframe Discussion List <[email protected]>
wrote on 02/05/2012 10:11:51 PM:
> I did a test with following DFSORT control statements on z/OS V1.12.
> It worked fine. Assume that input JFCB creation date field is at
> location 149 in SMF type 15 and output field is at location 128 in
> SORTOUT record.
>
> 128:149,1,BI,ADD,+1900,TO=ZD,LENGTH=4,C'/',
> 150,2,BI,TO=ZD,LENGTH=3,
>
> I found that adding operation had to be specify 'ADD' instead of '+'
> and the constant 1900 had to have '+' prefix sign. ;-)
>
> I didn't test 'yyyy/mm/dd' reformat yet. It requires me more time to
> understand the DFSORT control statements you gave me.
You can use DFSORT statements like the following to get the date in
'yyyy/mm/dd' form:
INREC IFTHEN=(WHEN=INIT,
* Convert X'yydddd' to 'yyyyddd'
BUILD=(128:149,1,BI,ADD,+1900,TO=ZD,LENGTH=4,
150,2,BI,TO=ZD,LENGTH=3)),
* Convert 'yyyyddd' to 'yyyy/mm/dd'
IFTHEN=(WHEN=INIT,BUILD=(128:128,7,Y4T,TOGREG=(Y4T(/))))
Frank Yaeger - DFSORT Development Team (IBM) - [email protected]
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsor
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN