View previous topic :: View next topic
|
Author |
Message |
mpawan Warnings : 2 New User
Joined: 03 Nov 2008 Posts: 42 Location: Pune
|
|
|
|
Hi,
I have a file whose structure is :-
Code: |
xxxxx20090305agagagag -- header
31231231237[b]09/20/09[/b]381723901230 -- rec
31231231237[b]09/20/09[/b]381723901230 -- rec
31231231237[b]09/20/09[/b]381723901230 -- rec
31231231237[b]09/20/09[/b]381723901230 -- rec
xxxxx20090306agagagag -- new header
31231231237[b]09/20/09[/b]381723901230 -- rec
31231231237[b]09/20/09[/b]381723901230 -- rec
31231231237[b]09/20/09[/b]381723901230 -- rec
31231231237[b]09/20/09[/b]381723901230 -- rec |
Using this file i have to perform following operations using fileaid:-
1) If header date is smaller than the sample date, we need to drop the records till the new header is encountered.
2)If header date is greater than or equal to the sample date, we need to write the records in a file and also check the dates in record and if the record date is less than sample date then we have to drop those record and don't have to be written in the o/p file.
And the criteria is we can only use Fileaid utility in our JCL.
I have coded this in COBOL but need to do it using Fileaid as i am new to fileaid, it would be appreciative if any one of you can help me
Thanks in advance. |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
Do you have any layouts for the header and data records? |
|
Back to top |
|
|
mpawan Warnings : 2 New User
Joined: 03 Nov 2008 Posts: 42 Location: Pune
|
|
|
|
Header will start with a number like xxxxx which will be unique and different from record. |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
I think its not possible with FILEAID. I would suggest you go for SORT. |
|
Back to top |
|
|
|