Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ICETOOL for split the file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ICETOOL for split the file
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    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us