View previous topic :: View next topic
Author
Message
rahul.banik New User Joined: 23 Jan 2007Posts: 16 Location: Mysore
Hi All,
My requirement is like that.
Create Jcl to split the input file into 10 files with each file containing 700,000 detail records and the last file containing all the remaining records. There is a header record in the input file and this needs to be copied to all the split files. If there are less number of records in the input file (less than 7 Million), some of the split files will have only the header record.
First record of the input is the header record and it's starting char is 'H'.
I need your help.
Thanks,
Rahul
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Here's a DFSORT/ICETOOL job that will do what you asked for. Be sure to use MOD for the OUTxx data sets.
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//***>> USE MOD FOR OUTXX DATA SETS
//OUT01 DD DISP=MOD,DSN=... output file 1
//OUT02 DD DISP=MOD,DSN=... output file 2
...
//OUT10 DD DISP=MOD,DSN=... output file 10
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(IN) USING(CTL2)
/*
//CTL1CNTL DD *
OPTION STOPAFT=1
OUTFIL FNAMES=(OUT01,OUT02,OUT03,OUT04,OUT05,
OUT06,OUT07,OUT08,OUT09,OUT10)
/*
//CTL2CNTL DD *
OPTION SKIPREC=1
OUTFIL FNAMES=(OUT01,OUT02,OUT03,OUT04,OUT05,
OUT06,OUT07,OUT08,OUT09,OUT10),
SPLIT1R=700000
/*
Back to top
rahul.banik New User Joined: 23 Jan 2007Posts: 16 Location: Mysore
Hi Frank,
I'm very sorry for the late response.Actually there was some mainframeID problem.Today I'm able to test your code.But I got return code 16,i.e. CC=0016.
Here is my job.
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=INPUT.TEST.FILE,DISP=SHR
//OUT01 DD DSN=OUTPUT.TEST1,
// DISP=(MOD,CATLG,DELETE),
// UNIT=WORK,SPACE=(TRK,(200,100),RLSE)
//OUT02 DD DSN=OUTPUT.TEST2,
// DISP=(MOD,CATLG,DELETE),
// UNIT=WORK,SPACE=(TRK,(200,100),RLSE)
//OUT03 DD DSN=OUTPUT.TEST3,
// DISP=(MOD,CATLG,DELETE),
// UNIT=WORK,SPACE=(TRK,(200,100),RLSE)
//OUT04 DD DSN=OUTPUT.TEST4,
// DISP=(MOD,CATLG,DELETE),
// UNIT=WORK,SPACE=(TRK,(200,100),RLSE)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
COPY FROM(IN) USING(CTL2)
/*
//CTL1CNTL DD *
OPTION STOPAFT=1
OUTFIL FNAMES=(OUT01,OUT02,OUT03,OUT04)
/*
//CTL2CNTL DD *
OPTION SKIPREC=1
OUTFIL FNAMES=(OUT01,OUT02,OUT03,OUT04),
SPLIT1R=30
/*
Input file contains 100 records.
I got the following TOOLMSG
Code:
SYNCTOOL RELEASE 1.5.2 - COPYRIGHT 2004 SYNCSORT INC.
INITIAL PROCESSING MODE IS "STOP"
"TOOLIN" INTERFACE BEING USED
COPY FROM(IN) USING(CTL1)
SYNCSORT CALLED WITH IDENTIFIER "0001"
OPERATION COMPLETED WITH RETURN CODE 0
COPY FROM(IN) USING(CTL2)
SYNCSORT CALLED WITH IDENTIFIER "0002"
SYNCSORT COMPLETED UNSUCCESSFULLY
OPERATION COMPLETED WITH RETURN CODE 16
PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 16
And from the DFSMSG I got this.
Code:
CTL2CNTL :
OPTION SKIPREC=1
OUTFIL FNAMES=(OUT01,OUT02,OUT03,OUT04),
SPLIT1R=30
*
WER428I CALLER-PROVIDED IDENTIFIER IS "0002"
WER268A OUTFIL STATEMENT : SYNTAX ERROR
I need your advice.
Back to top
Anuj Dhawan Superior Member Joined: 22 Apr 2006Posts: 6250 Location: Mumbai, India
Hi,
You are geeting WERXXX mesaages, which means You use Synnsort. Why don't You guys state in the start of thread that which SORT product do You use, so that Franks' efforts are not 'wasted'.
Back to top
rahul.banik New User Joined: 23 Jan 2007Posts: 16 Location: Mysore
Hi Anuj,
Sorry,but what exact information you want?Whatever I've got from TOOLMSG and DFSMSG,I've mentioned.
Below information Only I've missed.
SYNCSORT FOR Z/OS 1.2.2.3RI
Back to top
Alissa Margulies SYNCSORT Support Joined: 25 Jul 2007Posts: 496 Location: USA
Rahul,
Your application will run fine with SyncSort for z/OS 1.3. The upgrade is free and is available for download at Use [URL] BBCode for External Links or you can request a tape.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Note that the job I showed runs fine with DFSORT which has had the SPLIT1R function since April, 2006.
Back to top
Please enable JavaScript!