> JFCB creation date is 3 bytes hex filed in the format 'yydddd'.

Actually, of course, everything may be expressed in hex.  ;-)  

However, that doesn't tell the SORT program exactly how a field 
should be interpreted.  The fact is that the JFCB creation date is 
a 1-byte binary number followed by a 2-byte binary number.  

In assembler terms:  
JFCBCRDT DS    0XL3           CREATE DATE  
YY       DS    FL1            NUMBER OF YEARS SINCE 1900  
DDDD     DS    FL2            NUMBER OF DAYS  

You need to define that in SORT's terms.  

Since you have to add 1900 to this, you'll need two bytes.  

You may be able to take advantage of the preceding field, JFCBOPS2, 
(open routine internal switches), tell SORT to set it to all zeroes, treat 
it as a 2-byte field, and add 1900 to it.  

I haven't used SORT in a long, long time, but it looks as though it has 
control operators that can do that sort (pun not intended) of thing.  

Hope this helps.  
  


 > Date: Mon, 6 Feb 2012 03:47:13 +0900
> From: [email protected]
> Subject: How to reformat JFCB creation date in SMF to 'yyyy/mm/dd' format by 
> DFSORT
> To: [email protected]
> 
> 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.
> 
> Your help would be highly appreciated.
> 
> Minoru Massaki  (M*M)
                                          
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to