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

Removal of nth record from m records


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

New User


Joined: 21 Apr 2009
Posts: 10
Location: Hyderabad

PostPosted: Fri May 15, 2009 9:56 am
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 15, 2009 10:46 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 15, 2009 11:47 am
Reply with quote

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
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 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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top