Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
archer_denny,
The following JCL will give you the desired results. I assumed that your input date is in pos 1 for 4 bytes and your input file is FB 80 bytes. The converted date will be again placed in pos 1 thru 10
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
archer_denny,
IFOUTLEN overrides the INREC LRECL (or reformatted record length if the INREC record is further modified) determined by DFSORT from your INREC IFTHEN clauses. DFSORT sets an appropriate LRECL for the output records based on the build and overlay items specified by the IFTHEN clauses.
Explanation of the control cards.
1. The first IFTHEN expands the 4 byte pd field to 8 byte readable format and puts it at pos 81
2. The next 2 IFTHEN statements validate the Century portion and accordingly pad the century portion along with separators in pos 1.
THE IFOUTLEN will truncate the output length to 80 , so that you don't have the temp expanded PD value at 81 in output.