Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to skip some record? using JCL SORT?

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

New User


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

PostPosted: Mon Feb 06, 2006 5:25 pm    Post subject: How to skip some record? using JCL SORT?
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
References
priyesh.agrawal

Global Moderator


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

PostPosted: Mon Feb 06, 2006 5:46 pm    Post subject: Re: How to skip some record? using JCL SORT?
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: 37
Location: Bangalore, INDIA

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

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

Global Moderator


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

PostPosted: Mon Feb 06, 2006 6:27 pm    Post subject: Re: How to skip some record? using JCL SORT?
Reply with quote

From manuals...

Then search for "Eliminate".

Regards,

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

DFSORT Moderator


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

PostPosted: Mon Feb 06, 2006 9:33 pm    Post subject:
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 Moderator


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

PostPosted: Fri Sep 05, 2008 9:55 pm    Post subject:
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:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1