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
 
Join files splitted by DFSORT (SPLITBY) help

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Join files splitted by DFSORT (SPLITBY) help
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    Post subject: Reply to: Join files splitted by DFSORT (SPLITBY) help
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    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Mar 11, 2008 1:13 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Mar 11, 2008 8:53 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am

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