I am having a Sequential Having LRECL = 1060 & RECFM = FB. There are 2 Date Fields in the Record. I Would Like to Take the Difference of the Date & Write all Records from Input File Along with Date Difference. Below are the Required Attribute of I/P File & O/P File. How Can this is be Achieved using SORT.
I/P File: LRECL = 1060, RECFM = FB
O/P File: LRECL = 1064, RECFM = FB
Example:
I/P File:
AA 1233456 AAAABBBB12 33AAAAAAAAA 777788PPP 2012-08-29 KEEPIN OUTREC POGO MAINFRAME 2012-09-10 .........
Date1 = 2012-08-29, Length = 10, Start Pos = 46
Date2 = 2012-09-10, Length = 10, Start Pos = 86
O/P File:
AA 1233456 AAAABBBB12 33AAAAAAAAA 777788PPP 2012-08-29 KEEPIN OUTREC POGO MAINFRAME 2012-09-10 ......... 0013
0013 = Date2 - Date1. All Remaning Fields are Same. Date Difference Field To Appear as Last Field of the Record.
Thanks
Kind Rgd's