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

I have 2000 records now i need to seperate those who have


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gowrishankar.k

New User


Joined: 09 Apr 2007
Posts: 2
Location: bangalore

PostPosted: Thu Apr 26, 2007 5:39 pm
Reply with quote

i have pure flat file.in that i have 2000 records.now i what to seperate those who have taken up the interview on mainframes.those seperated items, i want to copy in a seperate file.so i want to know how can i do this by using jcl

Thanks to all of you.
Back to top
View user's profile Send private message
Rambhupal.chaudari

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Thu Apr 26, 2007 6:05 pm
Reply with quote

By using sort utility,you can copy the records based on the conditions in to a seperate file..plz look at the following jcl..

//STEPSORT EXEC PGM=SORT,PARM=sort-parms
//SORTIN DD DSN=G1SG00AT.SORTIN1,DISP=SHR Input for sort
//SORTOUT DD DSN=G1SG00AT.SORTOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSIN DD *
INCLUDE COND=(21,2,ch,EQ,c's')
/*

The INCLUDE above will only pass through records in which the contents of the 2 byte field at position 21 are equal to s
Back to top
View user's profile Send private message
pcoreddy

New User


Joined: 14 Mar 2007
Posts: 24
Location: Mysore

PostPosted: Thu Apr 26, 2007 6:15 pm
Reply with quote

By using FIlaid also we can do



//STEPCOPY EXEC PGM=FILEAID
//DD01 DD DSN=G1SG00AT.INPUT1,DISP=SHR
//DD01O DD DSN=G1SG00AT.OUTPUT1,DISP=OLD
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSIN DD *
$$DD01 COPY IF=(14,EQ,C'YES')
/*

copy input file data only if 14th Position is equal to Yes then copy to output file
Back to top
View user's profile Send private message
gowrishankar.k

New User


Joined: 09 Apr 2007
Posts: 2
Location: bangalore

PostPosted: Fri Apr 27, 2007 10:56 am
Reply with quote

thank you rambhupal and pcoreddy for your suggestions
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
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
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top