View previous topic :: View next topic
Author
Message
jonathanvanreed New User Joined: 10 Mar 2008Posts: 12 Location: Czech Republic
Hello there.
I tryed to split 1 file into 3 by 10 000 tracks each.
there is the JCL which I used:
Code:
//SPLITBY EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE,DISP=OLD
//01 DD DSN=FILE01,DISP=NEW
//02 DD DSN=FILE02,DISP=NEW
//03 DD DSN=FILE03,DISP=NEW
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(01,02,03),SPLITBY=10000
/*
The original file's DCB parameters:
Quote:
Dsorg Recfm Lrecl Blksz
--------------------------
PS FB 1024 6144
After the split I've got these values:
Quote:
Dsorg Recfm Lrecl Blksz
--------------------------
PS FB 1024 27648
I need to join these files into 1 with the original DCB (somekind of rollback) while this is a "tersed file" and if I try to join them with this JCL:
Code:
//S1 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=FILE1,DISP=SHR
// DD DSN=FILE2,DISP=SHR
// DD DSN=FILE3,DISP=SHR
//SYSUT2 DD DSN=OUTPUT.FILE,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1200,250),RLSE),
// DCB=(LRECL=1024,RECFM=FB,BLKSIZE=6144,DSORG=PS)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
then the TRSMAIN program with parameter 'UNPACK' give me a message:
Quote:
**** STARTING TERSE DECODE UNPACK 4.14 17:51:08 3/08/08 ****
FOR INPUT - DDNAME: INFILE DSNAME: INPUT.FILE.FROM.PREV.JCL
FOR OUTPUT - DDNAME: OUTFILE DSNAME: TRSMAIN.UNPACK.OUTPUT
** ERROR: FOUND A RECORD LONGER THAN THE LRECL.
THE VALUES ARE: BLKSIZE= 27998 LRECL=27998 PACKTYPE=PACK RECFM=UNDEFINE
**** FINISHED TERSE DECODE UNPACK 4.14 17:53:36 3/08/08 ****
RETURN CODE: 16
Any ideas how to solve this problem?
Thank you all!
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
jonathanvanreed,
You can override the DCB parameters with your SORTIN DCB like shown below. Btw I had to change your control cards also to refer them O (not zero)
Code:
//SPLITBY EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE,DISP=OLD
//O1 DD DSN=FILE01,DISP=(NEW,CATLG,DELETE),DCB=*.SORTIN
//O2 DD DSN=FILE02,DISP=(NEW,CATLG,DELETE),DCB=*.SORTIN
//O3 DD DSN=FILE03,DISP=(NEW,CATLG,DELETE),DCB=*.SORTIN
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(O1,O2,O3),SPLITBY=10000
/*
Back to top
jonathanvanreed New User Joined: 10 Mar 2008Posts: 12 Location: Czech Republic
hello Skolusu,
I already split the dataset with the wrong DCB as I wrote before and the original file was deleted. Is it possible to somehow correctly join them back?
I mean that the TRSMAIN program will end well without message FOUND A RECORD LONGER THAN THE LRECL.
Back to top
gcicchet Senior Member Joined: 28 Jul 2006Posts: 1702 Location: Australia
Hi Jonathan,
how many records did your file contain before the SPLITBY ?
The reason I ask is if you had more than 30000 records, the split files are not in the correct sequence.
SPLITBY writes 10000 to O1, 10000 to O2, 10000 to O3 and then back to 10000 to O1 etc etc
Gerry
Back to top
jonathanvanreed New User Joined: 10 Mar 2008Posts: 12 Location: Czech Republic
Hi gcicchet,
the concrete sysin was:
Quote:
OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLITBY=11655
And after the split I got 3 files:
DSN TRK % XT UNIT RECFM LRECL BLKSIZE
DUMP.TERSE.PART1 10365 99 1 3390 PS FB 1024 27648
DUMP.TERSE.PART2 10365 99 4 3390 PS FB 1024 27648
DUMP.TERSE.PART3 10350 99 1 3390 PS FB 1024 27648
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Note that DFSORT's SPLIT1R function would be a better choice than SPLITBY. SPLIT1R does NOT rotate the records back to the first file - it keeps writing records to the last file.
Back to top
Please enable JavaScript!