Job Format (for Experienced)


  • ICETOOL is used to SORT, COPY and MERGE applications.
  • ICETOOL can be called from a PGM, and a parameter list supplies its operators. For example -
    //STEP01 EXEC PGM=ICETOOL
    ....
    ....
    //TOOLIN DD *
      parameters-list
    /*
  • ICETOOL gives a return code for each operation and prints messages for each operation.
  • The ICETOOL operators are - COPY, COUNT, DATASORT, DEFAULTS, DISPLAY, MERGE, MODE, OCCUR, RANGE, RESIZE, SELECT, SORT, SPLICE, STATS, SUBSET, UNIQUE, and VERIFY.

ICETOOL Job Format


//JOBNAME JOB JOB-CARD-PARAMETERS
//*
//STEP EXEC PGM=ICETOOL (or PGM=program-name)
//* TOOLMSG or DFSMSG DD statements are always required
//TOOLMSG DD SYSOUT=A (or DSN=...)
//DFSMSG  DD SYSOUT=A
//* The TOOLIN DD Statement is required when ICETOOL statements coded
//TOOLIN DD *
  ICETOOL statements
/*
//* Below DD statements are required according to usage in ICETOOL statements
//indd DD ...
  .
  .
//outdd DD ...
  .
  .
//savedd DD ...                                                        
  .                                                                    
  .
//listdd DD SYSOUT=A (or DSN=...)
  .
  .
//countdd DD ...                                                        
  .                                                                    
  .
//xxxxCNTL DD *
  DFSORT control statements
/*
  .
  .

ICETOOL JCL Statements


  • EXEC PGM=ICETOOL - Used to call ICETOOL utility directly.
  • TOOLMSG - Specifies where to write the ICETOOL processing messages. The dataset with TOOLMSG has the same attributes as the DFSORT SYSOUT dataset.
  • DFSMSG - Specifies where to write the DFSORT processing messages. The DFSMSG dataset has the same attributes as the DFSORT SYSOUT dataset.
  • TOOLIN - Specifies the ICETOOL statements for DFSORT. The dataset has the same attributes as the DFSORT SYSIN dataset.
  • indd DD - Specifies an input file for a COPY, COUNT, DATASORT, DISPLAY, MERGE, OCCUR, RANGE, RESIZE, SELECT, SORT, SPLICE, STATS, SUBSET, UNIQUE, or VERIFY operations.
  • outdd DD - Specifies an output file for COPY, DATASORT, MERGE, RESIZE, SELECT, SORT, SPLICE, or SUBSET operations.
  • savedd DD - Specifies an output file for a SELECT or SUBSET operations.
  • listdd DD - Specifies a list file for a DEFAULTS, DISPLAY, or OCCUR operations.
  • countdd DD - Specifies an output file for a COUNT operation.
  • xxxxCNTL DD - Having DFSORT control statements for COPY, COUNT, DATASORT, MERGE, RESIZE, SELECT, SORT, SPLICE, or SUBSET operations.
Note! One input/output file needs one indd/outdd DD statement. Accordingly, the number of DD statements is decided by how many files we use in JCL.

ICETOOL Operator Statements


  • Each ICETOOL operator statement represents a task that ICETOOL needs to perform.
  • Any number of operators can be specified and in any order.
  • The general format for all ICETOOL statements is -
    operator operand ... operand
  • The operator is one of the seventeen ICETOOL operators - COPY, COUNT, DATASORT, DEFAULTS, DISPLAY, MERGE, MODE, OCCUR, RANGE, RESIZE, SELECT, SORT, SPLICE, STATS, SUBSET, UNIQUE and VERIFY COPY, COUNT, DATASORT, DEFAULTS, DISPLAY, MERGE, MODE, OCCUR, RANGE, RESIZE, SELECT, SORT, SPLICE, STATS, SUBSET, UNIQUE or VERIFY.
  • The operand is a keyword or keyword (parameter-list).
  • One or more blanks can be used before the operator and between operands.
  • Columns 1-72 are considered, and columns 73-80 are ignored.
  • The continuation can be indicated by a dash (-) after the operator or any operand.
  • Each operand should be fully specified on one line.

Comment Statements


  • Asterisk (*) in column 1 indicates a comment statement. For example -
    //STEP01 EXEC PGM=ICETOOL
    ....
    ....
    //TOOLIN DD *
    * comment line
      parameters-list
    /*
  • Comment statements are printed commonly with other ICETOOL statements.

Blank Statements


  • Blank in columns 1-72 indicates a blank statement.For example -
    //STEP01 EXEC PGM=ICETOOL
    ....
    ....
    //TOOLIN DD *
      icetool-statement1
      
      icetool-statement2
    /*
  • Blank statements are ignored since ICETOOL prints blank lines where suitable.

ICETOOL Return Codes


ICETOOL sets a return code for each operation it performs. ICETOOL sets the return code to the highest operator return code for the step.

The return codes are –

  • 0 - Successful completion. No errors were detected.
  • 4 - Successful completion. DFSORT detected one or more warning conditions.
  • 8 - Unsuccessful completion. RC8 was used for COUNT when the criteria were met.
  • 12 - Unsuccessful completion. ICETOOL detected one or more errors, or RC12 was used (or defaulted) for COUNT when the criteria were met.
  • 16 - Unsuccessful completion. DFSORT detected one or more errors.
  • 20 - Message data set error. The TOOLMSG DD statement was not present or the TOOLMSG data set was not opened.
  • 24 - Unsupported operating system.