IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Filter records on some criteria ?


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Fri Oct 31, 2008 2:52 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Oct 31, 2008 3:15 pm
Reply with quote

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
View user's profile Send private message
rulerofera

New User


Joined: 03 Jun 2008
Posts: 30
Location: India

PostPosted: Fri Oct 31, 2008 5:46 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top