sivaplv
New User
Joined: 15 Mar 2005 Posts: 17 Location: Toronto, Canada
|
|
|
|
Hi Frank,
Is it possible to format a binary date field into a legible date format (say yyyymmdd) in the output file unsing DFSORT? If so could you please provide me the piece of code?
I could not find this in DFSORT Documentation. If I missed it please provide me the chapter name, so that I can read it.
Thanks, |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If it's a yyyymmdd value in binary (e.g. F'20050715' = X'0131F31B'), then you can convert it to C'yyyymmdd' with DFSORT using an INREC, OUTREC or OUTFIL statement like this:
Code: |
OUTREC FIELDS=(1,4,BI,M11,LENGTH=8)
|
or like this:
Code: |
OUTREC FIELDS=(1,4,BI,EDIT=(TTTTTTTT))
|
or like this:
Code: |
OUTREC FIELDS=(1,4,BI,TO=ZD,LENGTH=8)
|
This is discussed fully in Chapter 3 of "z/OS DFSORT Application Programming Guide" under "OUTREC or BUILD" in sections "p,m,f,edit" and "p,m,f,to". |
|