View previous topic :: View next topic
|
Author |
Message |
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
Hi there,
I have got a unique requirement where, I want to achieve following:
My input file will have records as
PURGE
rec1xxxxxxxxxxxxxx
rec2xxxxxxxxxxxxxx
rec3xxxxxxxxxxxxxx
rec4xxxxxxxxxxxxxx
PURGE
rec5xxxxxxxxxxxxxx
rec6xxxxxxxxxxxxxx
PURGE
rec7xxxxxxxxxxxxxx
:
:
so on
This dataset has fixed record length 80.
So now I have to keep first PURGE line as it is in o/p dataset and skip other PURGE lines from i/p dataset and copy all the other records....
Is this possible through fileaid options...
Please help on this...
Thanks, |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try this
Code: |
//FILEAID EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD *
PURGE
REC1XXXXXXXXXXXXXX
REC2XXXXXXXXXXXXXX
REC3XXXXXXXXXXXXXX
REC4XXXXXXXXXXXXXX
PURGE
REC5XXXXXXXXXXXXXX
REC6XXXXXXXXXXXXXX
PURGE
REC7XXXXXXXXXXXXXX
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 COPY OUT=1
$$DD01 DROP OUT=0,
IF=(1,EQ,C'PURGE')
/*
|
Gerry |
|
Back to top |
|
|
rulerofera
New User
Joined: 03 Jun 2008 Posts: 30 Location: India
|
|
|
|
gcicchet wrote: |
Hi,
try this
Code: |
//FILEAID EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD *
PURGE
REC1XXXXXXXXXXXXXX
REC2XXXXXXXXXXXXXX
REC3XXXXXXXXXXXXXX
REC4XXXXXXXXXXXXXX
PURGE
REC5XXXXXXXXXXXXXX
REC6XXXXXXXXXXXXXX
PURGE
REC7XXXXXXXXXXXXXX
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 COPY OUT=1
$$DD01 DROP OUT=0,
IF=(1,EQ,C'PURGE')
/*
|
Gerry |
Thanks a lot .. it worked |
|
Back to top |
|
|
|