Hello retired mainframer-san,
Thank you very much for telling me the way of reformat the JFCB creation date.
It was really what I wanted to know.
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.
Anyway I really appreciate your help and again Thank you very much!
Minoru Massaki (M*M)
2012/2/6 retired mainframer <[email protected]>:
> :>: -----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
--
全先 実 - Minoru Massaki (M*M)
E-mail: [email protected]
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN