Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Removal of nth record from m records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Removal of nth record from m records
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    Post subject:
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

Senior Member


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

PostPosted: Fri May 15, 2009 11:47 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us