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

ICETOOL for split the file


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

New User


Joined: 25 Oct 2007
Posts: 16
Location: mumbai

PostPosted: Fri Oct 09, 2009 10:10 am
Reply with quote

Hi,

The below is the jcl to split a file in to multiple files.

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=_
//DFSMSG DD SYSOUT=_
//IN DD DSN=... input file
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//C1 DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//CTL3CNTL DD _
  OUTFIL FNAMES=(OUT_1,OUT_2,...,OUTnn), <--- code OUT_1-OUTnn
// DD DSN=_.C1,VOL=REF=_.C1,DISP=(OLD,PASS)
//OUT_1 DD DSN=... output file_1
//OUT_2 DD DSN=... output file_2
...
//OUTnn DD DSN=... output filenn <--- code OUT_1-OUTnn
//TOOLIN DD _
* Get the record count.
COPY FROM(IN) USING(CTL1)
* Generate:
* SPLIT1R=x where x = count/nn.
* nn is the number of output files.
COPY FROM(T1) TO(C1) USING(CTL2)
* Use SPLIT1R=x to split records contiguously among
* the nn output files.
COPY FROM(IN) USING(CTL3)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
    TRAILER1=(COUNT=(M11,LENGTH=8))
/*
//CTL2CNTL DD *
  OUTREC BUILD=(2X,C'SPLIT1R=',
    1,8,ZD,DIV,+nn, <--- set to nn
    TO=ZD,LENGTH=8,80:X)
/*


Here 'n' is the number of output files. Could any one please explain me the CTL1 and CTL2 control cards?

Thanks in advance.

Regards,
Atchuta
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Oct 09, 2009 10:51 am
Reply with quote

CTL1 is to write the record count of IN to T1(temp dataset)

In CTL2 that record count is used to build anather control card.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top