MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is this possible with JCL?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
nsantos
Beginner


Joined: 23 Sep 2003
Posts: 7
Topics: 4

PostPosted: Tue Sep 23, 2003 4:33 am    Post subject: Is this possible with JCL? Reply with quote

Hello,

Sorry for my bad english.
I have a sequential file (input file) with 3 different duplicate keys in position 1: x'001c', x'002c' and x'003c'. Each key occurs more than 50 times.
I want the output file to have the first 50 occurences of each key.
In the end the output file must have 150 records, the first 50 with the key x'001c', from position 51 to 100 with the key x'002c' and the last 50 with the key x'003c'.

Is this possible with JCL?

Thank you in advance.
Regards.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12395
Topics: 75
Location: San Jose

PostPosted: Tue Sep 23, 2003 5:57 am    Post subject: Reply with quote

nsantos,

nsantos,
Try this DFSORT/ICETOOL. If you have syncsort at your shop then change the program name to synctool.make sure that you delete the output file before every run as it is having DISP=MOD.

Code:

//STEP0100 EXEC PGM=ICETOOL                                               
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN       DD DSN=YOUR INPUTFILE,
//            DISP=SHR                                                 
//OUT      DD DSN=YOUR OUTPUT FILE,
//            DISP=(MOD,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//TOOLIN   DD *
  COPY FROM(IN) USING(CTL1)
  COPY FROM(IN) USING(CTL2)
  COPY FROM(IN) USING(CTL3)
//CTL1CNTL DD *
  INCLUDE COND=(1,2,PD,EQ,1)
  OUTFIL FNAMES=OUT,ENDREC=50
//CTL2CNTL DD *
  INCLUDE COND=(1,2,PD,EQ,2)
  OUTFIL FNAMES=OUT,ENDREC=50
//CTL3CNTL DD *
  INCLUDE COND=(1,2,PD,EQ,3)
  OUTFIL FNAMES=OUT,ENDREC=50   
//*


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nsantos
Beginner


Joined: 23 Sep 2003
Posts: 7
Topics: 4

PostPosted: Tue Sep 23, 2003 7:31 am    Post subject: Reply with quote

kolusu,
thank you.

But if i have a file with, let
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group