View previous topic :: View next topic
|
Author |
Message |
kiranbhargava18
New User
Joined: 21 Apr 2009 Posts: 10 Location: Hyderabad
|
|
|
|
Hi,
Can we use DFSORT or SYNCSORT or any other IBM Utility for the following?
I have M records in a VB File. I want to strip the file of its Nth record.
Eg: I have 100 records in a VB file and I want to strip the 7th record. If it is not possible with SORT Utilities, are there any other utilities for doing the above ? |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Hi Kiran,
You can get it using DFSORT like this
Code: |
//S1 EXEC PGM=ICETOOL
//SYSOUT DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//IN DD DSN=your input file
//OUT DD DSN=your output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) REMOVE INPUT RRN(7)
/*
|
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
are there any other utilities for doing the above ? |
If the record to be skipped is fixed, I mean like 7th in your example, adding a sequence number to the records and then skiping that sequence number which you don't want to copy in output or if DFSORT's RRN is available use that.
If this has to to with only some of the records, as an other alternative, open the file in view mode, delete the records you dont want, cut and paste the rest of the records in other DSN. |
|
Back to top |
|
|
|