IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting real value of a binary in output file using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sivaplv

New User


Joined: 15 Mar 2005
Posts: 17
Location: Toronto, Canada

PostPosted: Fri Jul 15, 2005 11:00 pm
Reply with quote

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,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Jul 16, 2005 12:52 am
Reply with quote

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".
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top