Page 1 of 1

ICETOOL and split the files.

Posted: Tue Jun 17, 2014 3:25 pm
by Niketan
Hi,

I am facing an issue when trying to spllit the input file into different files (say 5 files) based on number of records from input file.

I used ICETOOL to do this, but when my input records are lower than 5(ie lower than outpur files) my job is getting abending with RC 16, If anyone aware of this, pls share your ideas to fix this issue. Thanks.

Code: Select all

//PSTY0025 EXEC PGM=ICETOOL,
//IN DD DSN=input file,
//         DISP=(SHR,KEEP,KEEP)
//T1 DD DSN=&&T1,
//         DISP=(NEW,PASS,DELETE),
//         DATACLAS=LARGE
//C1 DD DSN=&&C1,
//         DISP=(NEW,PASS,DELETE),
//         DATACLAS=LARGE
//OUT1 DD DSN=output file 1,
//         DISP=(NEW,CATLG,DELETE),
//         DATACLAS=LARGE
//OUT2 DD DSN=output file 2,
//         DISP=(NEW,CATLG,DELETE),
//         DATACLAS=LARGE
//OUT3 DD DSN=output file 3,
//         DISP=(NEW,CATLG,DELETE),
//         DATACLAS=LARGE
//OUT4 DD DSN=output file 4,
//         DISP=(NEW,CATLG,DELETE),
//         DATACLAS=LARGE
//OUT5 DD DSN=output file 5,
//         DISP=(NEW,CATLG,DELETE),
//         DATACLAS=LARGE
//TOOLIN DD *
    COPY FROM(IN) USING(CTL1)
    COPY FROM(T1) TO(C1) USING(CTL2)
    COPY FROM(IN) USING(CTL3)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//CTL1CNTL DD *
    OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
    TRAILER1=(COUNT=(M11,LENGTH=8))
//CTL2CNTL DD *
    OPTION VLSHRT
    OUTFIL FNAMES=C1,VTOF,
    BUILD=(2X,C'SPLIT1R=',
               5,8,ZD,DIV,+5,
               TO=ZD,LENGTH=8,80:X)
//CTL3CNTL DD *
   OUTFIL FNAMES=(OUT1,OUT2,OUT3,OUT4,OUT5),
// DD DSN=*.C1,VOL=REF=*.C1,DISP=(OLD,CATLG,CATLG)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*

Re: ICETOOL and split the files.

Posted: Tue Jun 17, 2014 5:51 pm
by William Collins
Can you show the sysout from running the step so that we can see there error, please?

Re: ICETOOL and split the files.

Posted: Thu Jun 19, 2014 3:13 pm
by Niketan
My job is running fine when my input file had more than 5 or 5 records, But it is giving return code 16 when less than 5 records, Is there any way to create empty records if there are no records to split it.

Re: ICETOOL and split the files.

Posted: Thu Jun 19, 2014 4:35 pm
by William Collins
I'm tempted to just say No. In fact, since "empty records" are difficult to visualize even, I am going to say, No, you can't create them.

Can you show the sysout from running the step so that we can see there error, please?

Every time you fail to provide information which is asked, it takes longer to get your answer, and eventually you just won't get it.