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

Usinng DFSORT - Select first and last few records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
AUTODREAMZ

New User


Joined: 17 May 2005
Posts: 3

PostPosted: Tue Sep 15, 2009 3:23 am
Reply with quote

I need to select first few records in a file, then need to skip few and then select last few.

Please help me to write sort card
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10903
Location: italy

PostPosted: Tue Sep 15, 2009 3:39 am
Reply with quote

search the forum for icetool subset

ibmmainframes.com/viewtopic.php?t=39081&highlight=icetool+subset
ibmmainframes.com/viewtopic.php?t=42761&highlight=icetool+subset
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: Tue Sep 15, 2009 5:08 am
Reply with quote

Autodreamz,

Here's an example of a DFSORT/ICETOOL job using SUBSET to keep the first 3 input records and the last 3 input records. Adapt as needed:

Code:

//S1   EXEC  PGM=ICETOOL                                 
//TOOLMSG   DD  SYSOUT=*                                 
//DFSMSG    DD  SYSOUT=*                                 
//IN DD *                                                 
RECORD 01                                                 
RECORD 02                                                 
RECORD 03                                                 
RECORD 04                                                 
RECORD 05                                                 
RECORD 06                                                 
RECORD 07                                                 
RECORD 08                                                 
RECORD 09                                                 
RECORD 10                                                 
//OUT DD SYSOUT=*                                         
//TOOLIN DD *                                             
SUBSET FROM(IN) TO(OUT) KEEP INPUT FIRST(3) LAST(3)       
/*


OUT would have:

Code:

RECORD 01   
RECORD 02   
RECORD 03   
RECORD 08   
RECORD 09   
RECORD 10   


For complete details on SUBSET, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA40/6.16?DT=20090527161936
Back to top
View user's profile Send private message
AUTODREAMZ

New User


Joined: 17 May 2005
Posts: 3

PostPosted: Tue Sep 15, 2009 5:40 am
Reply with quote

Great!!! Really helpful!!! Thank you so much!!!!
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts DFSORT Join Keys Controlcard DFSORT/ICETOOL 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
Search our Forums:


Back to Top