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

How to skip some record? using JCL SORT?


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

New User


Joined: 18 May 2005
Posts: 46
Location: Bangalore, INDIA

PostPosted: Mon Feb 06, 2006 5:25 pm
Reply with quote

How to skip some record? In a file i have process up to 400 records and then i have to skip 10 Records then i have to process next 400 records? Can anyone help reg this?
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Feb 06, 2006 5:46 pm
Reply with quote

Few SORT ways... SKIPREC, STOPAFT, INCLUDE, OMIT etc..

Regards,

Priyesh.
Back to top
View user's profile Send private message
subramanianup
Warnings : 1

New User


Joined: 18 May 2005
Posts: 46
Location: Bangalore, INDIA

PostPosted: Mon Feb 06, 2006 5:54 pm
Reply with quote

can you explain briefly?
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Feb 06, 2006 6:27 pm
Reply with quote

From manuals...

Then search for "Eliminate".

Regards,

Priyesh.
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: Mon Feb 06, 2006 9:33 pm
Reply with quote

Here's a DFSORT job that will do what you asked for. I assumed your input file had RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(81:SEQNUM,8,ZD)
  OUTFIL OMIT=(81,8,ZD,GE,+401,AND,81,8,ZD,LE,+410),
    BUILD=(1,80)
/*
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 Sep 05, 2008 9:55 pm
Reply with quote

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

Code:

//S1  EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file (FB/80)
//OUT DD DSN=...  output file (FB/80)
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) REMOVE INPUT RRN(401,410)
/*


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
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
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 JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top