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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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