Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
I have 2000 records now i need to seperate those who have

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: I have 2000 records now i need to seperate those who have
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    Post subject: Re: i have 2000 records now i need to seperate those who hav
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    Post subject: Re: i have 2000 records now i need to seperate those who hav
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    Post subject: Re: I have 2000 records now i need to seperate those who hav
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us