How to copy single file to multi files with ICETOOL

ID-100183874
The best ICETOOL examples

The below ICETOOL example gives new thoughts on copying single data set  to multiful data sets. You can write JCL in Mainframe as below for this. Maximum output data sets limit is 10.

//EXAMP JOB ...
//TOOL EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=A
//DFSMSG DD SYSOUT=A
//TOOLIN DD *

COPY FROM(N) TO(DASD,PRINT,TAPE) => Copy to multiple data sets ..
COUNT FROM(IN2) => Counts number of records in N2 ...
//*Sort input data set to a output data set with DFSORT control statement 
//*in "CTL1"
SORT FROM(IN1) TO(OUT1) USING(CTL1) 

//*Specified fields from two or more records can be combined to create 
//*an output record. The fields to be spliced can originate from records 
//*in different data sets, so various "join" and "match" operations 
//*can be performed. Example: for ON fields that occur more than 
//*once (i.e., duplicate ON field values) in the CONCT data set, splices the 
//*WITH field from the last duplicate record into the first 
//*duplicate record. ...
SPLICE FROM(CONCT) TO(COMBINE) ON(11,5,CH) WITH(41,2) 

//*prints a message in TOOLMSG containing the count of unique 
//*values for a specified numeric or character field. 
//*Example: print the count of unique values in the OUT1 data set ON field. ....
UNIQUE FROM(OUT1) ON(3,2,PD) 

//*Identify all values in the two IN2 data set decimal ON 
//*fields that have invalid digits (A-F) and/or invalid signs (-9).
VERIFY FROM(IN2) ON(1,2,ZD) ON(41,6,PD)

Notes: You can combine ICETOOL with DFSORT control cards as above.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.