Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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: 2285
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: 2285
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: 2285
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us