IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Join files splitted by DFSORT (SPLITBY) help


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jonathanvanreed

New User


Joined: 10 Mar 2008
Posts: 12
Location: Czech Republic

PostPosted: Tue Mar 11, 2008 12:33 am
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Mar 11, 2008 2:38 am
Reply with quote

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
View user's profile Send private message
jonathanvanreed

New User


Joined: 10 Mar 2008
Posts: 12
Location: Czech Republic

PostPosted: Tue Mar 11, 2008 12:40 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Mar 11, 2008 1:13 pm
Reply with quote

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
View user's profile Send private message
jonathanvanreed

New User


Joined: 10 Mar 2008
Posts: 12
Location: Czech Republic

PostPosted: Tue Mar 11, 2008 1:31 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Mar 11, 2008 8:53 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top