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

Copy only from 10th record to 20th record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Sun May 03, 2009 6:25 pm
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
Reply with quote

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

DFSORT Developer


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

PostPosted: Mon May 04, 2009 9:18 pm
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
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: 2146
Location: At my coffee table

PostPosted: Tue May 05, 2009 6:18 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top