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

convert packed date fields into readable format with sort.


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

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Wed Jul 04, 2007 4:22 pm
Reply with quote

Hi,

I want to convert a packed format date values into a format of readable mm/dd/yy using SORT.

Say, the packed decimal has a cobol equivalent declaration s9(6) comp-3.

this date fiend starts from 10th position, and it is in a variable length file.

help me with an OUTREC syntax.
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: Wed Jul 04, 2007 9:18 pm
Reply with quote

Here's a DFSORT job that will do what you asked for. I assumed that the input field is in the form P'mmddyy' and when you say position 10 you're giving the data position so the actual position in the VB file is 10+4 (+4 for the RDW) = 14.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (VB)
//SYSIN    DD    *
  OPTION COPY
  OUTREC BUILD=(1,13,14,4,PD,EDIT=(TT/TT/TT),18)
/*
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top