:>: -----Original Message-----
:>: From: IBM Mainframe Discussion List [mailto:[email protected]] On
:>: Behalf Of Minoru Massaki
:>: Sent: Sunday, February 05, 2012 10:47 AM
:>: To: [email protected]
:>: Subject: How to reformat JFCB creation date in SMF to 'yyyy/mm/dd'
:>: format by DFSORT
:>:
:>: Hello DFSORT expert,
:>:
:>: I'm looking for the way to reformat JFCB creation data x'yydddd' to
:>: c'yyyy/mm/dd' by using DFSORT.
:>: I have read DFSORT manuals and looked for it in Web, I still don't
:>: have right answer.
:>:
:>: JFCB creation date is 3 bytes hex filed in the format 'yydddd'.
:>: the year yy is an offset from 1900.  i.e. year 2012 is 1900 + 112.
:>: The 112 in hex is 70.
:>: So January 10, 2012 in JFCB creation date become x'70000A'.
:>: I want to reformat the JFCB creation date as C'2012/01/10' by DFSORT.
:>: If 'yyyymm/dd' format is not possible, 'yyyy/ddd' is another
possibility.

The BI format will extract the yy as a decimal number.  Adding 1900 will
convert it to the correct year.  If we assume the JFCB date is at location
144 in the record, then something like
     220:144,1,BI,+,1900,TO=ZD,LENGTH=4,C'/',113,2,BI,TO=ZD,LENGTH=3
should produce the date in yyyy/ddd format.

On the other hand, if you convert the date to SMF format, you can use
DFSORT's DT1 edit format to produce yyyymmdd which you can convert to
yyyy/mm/dd.  Something like

200:144,1,BI,*,10,TO=PD,LENGTH=3,202:113,2,TO=PD,LENGTH=2,210:200,4,DT1,
        220:210,4,C'/',214,2,C'/',216,2

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to