There is a file consisting about 1 million records. I want to selectively bypass 3 records in between and copy all the records above & below it. For e.g. here's an example of this file:
Code:
...PRMGBSIC..................EãYUD 2500000
...PRMGSUMM..................E/d01........
..jPRMGLCMP..................E/ü..........
...PRMGBSIC..................EÂøYG 8000000 these
...PRMGSUMM..................EÂÞ01.....@.. three
..íPRMGHCMP..................EÄ.....æ....< records
...PRMGBSIC..................EÄ;AG 2500000
...PRMGSUMM..................EÄæ01....èð..
..jPRMGLCMP..................EÄ4...èð....@
Here, I wanto to bypass 3 records starting from YG 800000 and copy the records above and below it into a new file. So, basically, after copying, it would look like
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
Code:
...PRMGBSIC..................EÂøYG 8000000 these
...PRMGSUMM..................EÂÞ01.....@.. three
..íPRMGHCMP..................EÄ.....æ....< records
VK,
Can the "PRMGBSIC" be treated as a "header" and the "8000000" be treated as the "value"?
Deleting a headered group of records on the fly should be do-able.....
Here are the answers to some of the answers in previous posts:
- The RECFM = VB & LRECL = 27998.
- I do not know the count of records in this file, so I am not sure if I can use STOPAFT, SKIPREC. Is there a method to find the count of records in the file.
- There are 3 "YG 80" records in the file, but the one I want to eliminate can be uniquely identified by "YG 8000000".