balukanna
New User
Joined: 09 Apr 2008 Posts: 41 Location: USA
|
|
|
|
hi,
i need to remove header records from the input file, my requirement is
I/P FILE:
1
*********34455
*********rtyu
fghjik
.........(18 lines)
from
to
receive
...........
1
***dfgerty
***abcdef
fertyu
.........(18 lines)
from
to
send
..........
O/P FILE:
from
to
receive
...........
from
to
send
..........
the header has 18 lines which starts with 1 always as given in the above example,, |
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Balukanna,
The following DFSORT control cards will give you the desired results. I assumed that your input file is FB recfm and 80 bytes in length. The header records(18) from each group are removed
Code: |
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'1'),OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=NONE,OVERLAY=(89:SEQNUM,8,ZD,
81:81,8,ZD,SUB,89,8,ZD,M11,LENGTH=8))
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(89:SEQNUM,8,ZD,RESTART=(81,8)))
OUTFIL OMIT=(89,8,ZD,LE,18),BUILD=(1,80)
/* |
|
|