i have a GDG input file,it is created daily except Saturday and sunday,,It has a header record saying that date format is dd/mm/yy.(Pos : 10-17)LRECL is 88 FB
My requirement is to fetch the previous date record with compare of header date.FORMAT IS YYYYMMDD(pos:8-15)
I/p file is :
000001 00HEADER 11/05/10
.
162200 0311RON2010051000009628470678300000000000000
162201 0311EUR2010051000013022594400100000000000000
.
168852 99TRAILER 000146 000010 168694 000000 168850
My o/p should be
000001 00HEADER 11/05/10
000002 0311RON2010051000009628470678300000000000000
000003 0311EUR2010051000013022594400100000000000000
000004 99TRAILER 0000002 0000001 000001 0000004---------TOTAL NO OF RECORDS
|-------NO OF RECORDS
If the header date day is Monday means..input file Like
000001 00HEADER 10/05/10
112560 0311EUR2010050700012746637522400000000000000
022619 0311RON2010050700003044050000000000000000000
.
85168852 99TRAILER 000146 000010 168694 000000
o/p should be
000001 00HEADER 10/05/10
000002 0311EUR2010050700012746637522400000000000000
000003 0311RON2010050700003044050000000000000000000
000004 99TRAILER 0000002 0000001 000001 0000004
see the date:20100507 but header date is 10/05/10(bcoz of 08 and 09 is saturday and sunday)
Can you help me
Thanks
Shyamsaravan