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 add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 9 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 15 Fri Feb 09, 2018 10:38 pm
No new posts Why is SORT rearranging records that ... cschablow DFSORT/ICETOOL 4 Wed Jan 24, 2018 10:14 pm

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