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
 

 

Spliting files into output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rafael2009

New User


Joined: 21 May 2009
Posts: 18
Location: Mumbai

PostPosted: Fri May 29, 2009 3:28 pm    Post subject: Spliting files into output
Reply with quote

Hi,

I want to split the below input to different output files
input:
01 WERTYERWTY
02 RETHRETHRT
02 RETHRTHRTH
03 ERHERH444
04 555555555
05 666666666
06 777777777
06 ERHWRTHERH
99 999999999

Outfile1
01 WERTYERWTY

Outfile2
02 RETHRETHRT
02 RETHRTHRTH

Outfile3
03 ERHERH444

Outfile4
04 555555555
05 666666666
06 777777777
06 ERHWRTHERH
99 999999999
Back to top
View user's profile Send private message

vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri May 29, 2009 3:34 pm    Post subject:
Reply with quote

Hi Rafael,
You can use this:
Code:

//STEP0    EXEC PGM=SYNCTOOL                                   
//IN1      DD *                                               
01 WERTYERWTY                                                 
02 RETHRETHRT                                                 
02 RETHRTHRTH                                                 
03 ERHERH444                                                   
04 555555555                                                   
05 666666666                                                   
06 777777777                                                   
06 ERHWRTHERH                                                 
99 999999999                                                   
//TOOLIN   DD *                                               
  COPY FROM(IN1) USING(CTL1)                                   
//CTL1CNTL DD *                                               
 OUTFIL FNAMES=OUTFIL1,INCLUDE=(1,2,CH,EQ,C'01')               
 OUTFIL FNAMES=OUTFIL2,INCLUDE=(1,2,CH,EQ,C'02')               
 OUTFIL FNAMES=OUTFIL3,INCLUDE=(1,2,CH,EQ,C'03')               
 OUTFIL FNAMES=OUTFIL4,SAVE                                   
//OUTFIL1  DD SYSOUT=*                                         
//OUTFIL2  DD SYSOUT=*                                         
//OUTFIL3  DD SYSOUT=*                                         
//OUTFIL4  DD SYSOUT=*                                         
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         


Thanks, Balu
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2239
Location: @my desk

PostPosted: Fri May 29, 2009 3:46 pm    Post subject:
Reply with quote

Quote:
Please state the "rules" to get the output --
And the Sort product/version installed in your shop.
Back to top
View user's profile Send private message
rafael2009

New User


Joined: 21 May 2009
Posts: 18
Location: Mumbai

PostPosted: Fri May 29, 2009 4:06 pm    Post subject: Reply to: Spliting files into output
Reply with quote

Thanks everyone... it worked with SYNCTOOL ... the sort rule was that the 4th file should contain rest of recorts (apart from 01 02 03)
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2239
Location: @my desk

PostPosted: Fri May 29, 2009 4:15 pm    Post subject:
Reply with quote

rafael2009,

You dont really need SYNCTOOL for this.

Code:
//STEP1  EXEC  PGM=SORT                         
//SYSOUT   DD  SYSOUT=*                         
//SORTIN   DD  DSN= Input file                   
//OUTFIL1  DD SYSOUT=*                           
//OUTFIL2  DD SYSOUT=*                           
//OUTFIL3  DD SYSOUT=*                           
//OUTFIL4  DD SYSOUT=*                           
//SYSIN    DD  *                                 
  OPTION COPY                                   
  OUTFIL FNAMES=OUTFIL1,INCLUDE=(1,2,CH,EQ,C'01')
  OUTFIL FNAMES=OUTFIL2,INCLUDE=(1,2,CH,EQ,C'02')
  OUTFIL FNAMES=OUTFIL3,INCLUDE=(1,2,CH,EQ,C'03')
  OUTFIL FNAMES=OUTFIL4,SAVE                     
/*
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri May 29, 2009 4:24 pm    Post subject:
Reply with quote

I had a recent job in my spool with Icetool step, so just modified and pasted here!!
I hope there will not be any change in processing time from Icetool to sort.. Not sure icon_smile.gif

Thanks, Balu
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2239
Location: @my desk

PostPosted: Fri May 29, 2009 4:28 pm    Post subject:
Reply with quote

Quote:
I hope there will not be any change in processing time from Icetool to sort..
You can save a control card at least icon_smile.gif
Back to top
View user's profile Send private message
rafael2009

New User


Joined: 21 May 2009
Posts: 18
Location: Mumbai

PostPosted: Fri May 29, 2009 4:43 pm    Post subject: Reply to: Spliting files into output
Reply with quote

Thanks a lot Arun...
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2239
Location: @my desk

PostPosted: Fri May 29, 2009 6:12 pm    Post subject:
Reply with quote

You're welcome. icon_smile.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm


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