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
 

 

TO SKIP specific number of records from the i/p file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dckreddy
Warnings : 1

New User


Joined: 23 Sep 2008
Posts: 1
Location: USA

PostPosted: Thu Oct 23, 2008 10:37 pm    Post subject: TO SKIP specific number of records from the i/p file
Reply with quote

Hi,

I heard that SKIPREC=z will skip first z records from the input files.
I want a single sort card to skip records 2, 100, 500 and 550 from the input file. Can any body help me out in this regard?
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Oct 23, 2008 11:35 pm    Post subject:
Reply with quote

dckreddy,

You can do this quite easily using the new SUBSET operator of DFSORT's ICETOOL available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:
Code:

//STEP0100 EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN       DD DSN=...  input file
//OUT      DD DSN=...  output file                                               
//TOOLIN   DD *                                                       
SUBSET FROM(IN) TO(OUT) REMOVE INPUT RRN(2) RRN(100) RRN(500) RRN(550)
/*   


For complete details on the new SUBSET function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
Back to top
View user's profile Send private message
suma_infy

New User


Joined: 03 Oct 2008
Posts: 25
Location: chennai

PostPosted: Fri Oct 24, 2008 10:22 am    Post subject:
Reply with quote

Kolusu,

I'm not provided with the above said version of DFSORT'S ICETOOL.

This is what the msg displayed in the spool.

SUBSET FROM(INDD1) TO(OUTDD1) REMOVE INPUT RRN(2) RRN(40)
£
INVALID OPERATOR
OPERATION RETURN CODE: 12

Is there anyother way to skip selective records from i/p file?
Thanks in advance.

Thanks & Regards,
Suma
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Oct 24, 2008 11:09 am    Post subject:
Reply with quote

Hi,

you can try this
Code:
//STEP1    EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DSN=INPUT-FILE LRECL 80                                   
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  SORT FIELDS=COPY                                                     
  INREC OVERLAY=(81:SEQNUM,8,ZD)                                       
  OUTFIL OMIT=(81,8,ZD,EQ,+2,OR,                                       
                81,8,ZD,EQ,+40),                                       
      BUILD=(1,80)                                                     
/*                                                                     



Gerry
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Oct 24, 2008 9:12 pm    Post subject:
Reply with quote

Suma,

Quote:
I'm not provided with the above said version of DFSORT'S ICETOOL.


If you're using z/OS DFSORT V1R5, then you just need a PTF, not a new version. Ask your System Programmer to install z/OS DFSORT V1R5 PTF UK90013 (July, 2008) - it's free.

Note that Gerry's solution assumes your input file has RECFM=FB and LRECL=80 and would have to be changed for other attributes. The SUBSET solution can be used for any attributes without change.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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