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

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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:

Use [URL] BBCode for External Links
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
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: 1702
Location: Australia

PostPosted: Fri Oct 24, 2008 11:09 am
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 Developer


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

PostPosted: Fri Oct 24, 2008 9:12 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top