Beruflich Dokumente
Kultur Dokumente
ICETOOL
TABLE OF CONTENTS
DFSORT and ICETOOL have lot of uses in Mainframe application. Few of them will be
discussed here.
DFSORT’s SPLIT option can be used to split a dataset into two or more datasets in different
manner.
Merging two input fields (one field holding a decimal number and the second field holding the
sign of the decimal number) into one output field can be done easily through DFSORT.
We may come across a scenario where we need to execute a program which uses an input file
and if we have high possibility of getting an empty input file then we may wish to skip that step
from execution. ICETOOL can be used to check whether an input dataset is an empty dataset
and if the input dataset is an empty dataset then the RC of that step can be set to 12 or 4 and
using this RC the actual step which uses this input file can be skipped out of execution.
1.2 Intended Users
These jobs can be used by all Mainframe Application Programmers who want to split a dataset
into two or more dataset and who want to check an empty input file.
The following JCL’s can be typed in a member of PDS file and can be SUBMITted as and when
required.
The below job can be used to split the input file into output files each having specific number of
contiguous records. For e.g. the below job which has SPLIT1R parameter given as 3 will split the
input file and writes the first 3 records to the first output file, the second 3 records to the second
output file etc., and any extra records to the last output file.
If we had used the same output file which we used for SPLIT1R example, then the output files
will be having the below records
OUT1
INPUT RECORD 01
INPUT RECORD 04
INPUT RECORD 07
INPUT RECORD 10
OUT2
INPUT RECORD 02
INPUT RECORD 05
INPUT RECORD 08
OUT3
INPUT RECORD 03
INPUT RECORD 06
INPUT RECORD 09
If we had used the same output file which we used for SPLIT1R example, then the output files
will be having the below records
OUT1:
INPUT RECORD 01
INPUT RECORD 02
INPUT RECORD 07
INPUT RECORD 08
OUT2:
INPUT RECORD 03
INPUT RECORD 04
INPUT RECORD 09
INPUT RECORD 10
OUT3:
INPUT RECORD 05
INPUT RECORD 06
STARTREC and ENDREC can be used if we need to copy few records, for which we know their
exact line number, from the input file to an output file.
If we had used the same output file which we used for SPLIT1R example, then the output file will
be having the below records
INPUT RECORD 03
INPUT RECORD 04
INPUT RECORD 05
INPUT RECORD 06
INPUT RECORD 07
INPUT RECORD 08
Had the option RC4 been not used then by default the Return code will get set to 12