sonu_winks
New User
Joined: 23 Nov 2005 Posts: 23
|
|
|
|
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. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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)
/*
|
|
|