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
 
Split file dynamically using SYNCTOOL

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

New User


Joined: 18 Apr 2007
Posts: 23
Location: Chennai

PostPosted: Thu Apr 23, 2009 5:30 am    Post subject: Split file dynamically using SYNCTOOL
Reply with quote

I'm using the below mentioned JOB to split a file into 2 equal files with recs in the same order as the input file.

For instance I have a file with 10 recs
1
2
3
4
5
6
7
8
9
0

I wish to create file 1 with recs 1 through 5 and file 2 with recs 6 through 10

The job is as below:

Code:
//SORT4    EXEC PGM=SYNCTOOL                                 
//TOOLMSG DD SYSOUT=*                                       
//DFSMSG  DD SYSOUT=*                                       
//IN       DD DSN=TOP1.BALASH.FILE,DISP=SHR                 
//C1       DD DSN=&&C1,SPACE=(TRK,(20,5),RLSE),DISP=(,PASS) 
//T1       DD DSN=&&T1,SPACE=(TRK,(20,5),RLSE),DISP=(,PASS,)
//CTL3CNTL DD *                                             
  OUTFIL FNAMES=(OUT1,OUT2),                                 
//         DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,PASS)         
/*                                                           
//OUT1     DD DSN=TOP1.BALASH.OUTFILE1,                     
//            SPACE=(TRK,(20,5),RLSE),DISP=(NEW,CATLG,DELETE)
//OUT2     DD DSN=TOP1.BALASH.OUTFILE2,                     
//            SPACE=(TRK,(20,5),RLSE),DISP=(NEW,CATLG,DELETE)
//TOOLIN  DD *                           
  COPY FROM(IN) USING(CTL1)             
  COPY FROM(T1) TO(C1) USING(CTL2)       
  COPY FROM(IN) USING(CTL3)             
/*                                       
//CTL1CNTL DD *                         
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,   
  TRAILER1=(COUNT=(M11,LENGTH=8))       
/*                                       
//CTL2CNTL DD *                         
  OUTREC BUILD=(2X,C'SPLIT1R=',         
    1,8,ZD,DIV,+02,TO=ZD,LENGTH=11,80:X)
/*                                       
//*                                     

I get an ABEND as the CTL3 output is not numeric
CTL3CNTL :
Code:
  OUTFIL FNAMES=(OUT1,OUT2),                   
  SPLIT1R=0000000000E                           
          *                                   
WER428I  CALLER-PROVIDED IDENTIFIER IS "0003"   
WER271A  OUTFIL STATEMENT  : NUMERIC FIELD ERROR
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE   


How do i fix this?

Thanks,
Hariharan
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 23, 2009 5:43 am    Post subject: Re: Split file dynamically using ICETOOL
Reply with quote

hariharan_82 wrote:
I get an ABEND as the CTL3 output is not numeric
CTL3CNTL :
Code:
  OUTFIL FNAMES=(OUT1,OUT2),                   
  SPLIT1R=0000000000E                           
          *                                   
WER428I  CALLER-PROVIDED IDENTIFIER IS "0003"   
WER271A  OUTFIL STATEMENT  : NUMERIC FIELD ERROR
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE   
SyncSort for z/OS 1.3 Programmer’s Guide wrote:
The SPLITBY=n parameter writes groups of records in rotation among multiple output data sets and distributes multiple records at a time among the OUTFIL data sets. n specifies the number of records to split by.
Where did "0000000000E" become a "number"?
What "number" did you intend to split by?
Back to top
View user's profile Send private message
hariharan_82

New User


Joined: 18 Apr 2007
Posts: 23
Location: Chennai

PostPosted: Thu Apr 23, 2009 5:46 am    Post subject:
Reply with quote

0000000000E is what is getting written dynamically to the C1 fiel which shoudl actually look like

OUTFIL FNAMES=(OUT1,OUT2),
SPLIT1R=00000000005

which implies that '5' recs should be written to each file in the same order of occurrence as the input file.

Thanks,
Hari
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 23, 2009 5:53 am    Post subject:
Reply with quote

Go with the best advice posible, similar problem, similar answer:
Frank Yaeger wrote:
TO=ZDF instead of TO=ZD should get you the same thing for Syncsort.
Back to top
View user's profile Send private message
hariharan_82

New User


Joined: 18 Apr 2007
Posts: 23
Location: Chennai

PostPosted: Thu Apr 23, 2009 6:08 am    Post subject:
Reply with quote

That was great. Thanks much.
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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