|
View previous topic :: View next topic
|
| Author |
Message |
AUTODREAMZ
New User
Joined: 17 May 2005 Posts: 3
|
|
|
|
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 |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
 |
AUTODREAMZ
New User
Joined: 17 May 2005 Posts: 3
|
|
|
|
| Great!!! Really helpful!!! Thank you so much!!!! |
|
| Back to top |
|
 |
|
|