Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy only from 10th record to 20th record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
thangavels

New User


Joined: 03 May 2009
Posts: 6
Location: Chennai

PostPosted: Sun May 03, 2009 6:03 pm    Post subject: Is there any way in ICETOOL to copy from 'n' to 'm' record
Reply with quote

Hi,

Is there any way in ICETOOL to copy from 'n' record to 'm' record. (ie.. i need only from 10th record to 20 th record from the input file)

Thanks,
Vels
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sun May 03, 2009 6:25 pm    Post subject:
Reply with quote

Found in the DFSORT section:
SKIPREC - Specifies the number of records z you want to skip (delete) before starting to sort or copy the input data set.
STOPAFT - Specifies the maximum number of records (n) you want accepted for sorting or copying (that is, read from SORTIN or inserted by E15 and not deleted by SKIPREC, E15, or the INCLUDE/OMIT statement).

Found in the ICETOOL section:
You can use DFSORT control statements and options in the xxxxCNTL data set to copy a subset of the input records (...; SKIPREC and STOPAFT options; ...),... and so on.
Back to top
View user's profile Send private message
thangavels

New User


Joined: 03 May 2009
Posts: 6
Location: Chennai

PostPosted: Sun May 03, 2009 6:50 pm    Post subject:
Reply with quote

Thanks lot... icon_smile.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon May 04, 2009 9:18 pm    Post subject:
Reply with quote

Here are two ways to do what you asked for:

SUBSET

Code:

//S1   EXEC  PGM=ICETOOL                             
//TOOLMSG   DD  SYSOUT=*                             
//DFSMSG    DD  SYSOUT=*                             
//IN DD DSN=...  input file                   
//OUT DD DSN=...  output file                             
//TOOLIN DD *                                         
SUBSET FROM(IN) TO(OUT) KEEP INPUT RRN(10,20)         


SKIPREC and STOPAFT

Code:

//S2    EXEC  PGM=SORT                       
//SYSOUT    DD  SYSOUT=*                     
//SORTIN DD DSN=...  input file 
//SORTOUT DD DSN=...  output file                 
//SYSIN    DD    *                           
  OPTION COPY,SKIPREC=9,STOPAFT=11           
/*
Back to top
View user's profile Send private message
thangavels

New User


Joined: 03 May 2009
Posts: 6
Location: Chennai

PostPosted: Tue May 05, 2009 4:46 am    Post subject:
Reply with quote

Thanks Frank... icon_smile.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue May 05, 2009 6:18 am    Post subject:
Reply with quote

Thanks Frank... icon_smile.gif
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us