AMT Help Files
Home Development Command Translation CICS Commands HANDLE CONDITION

HANDLE CONDITION

COBOL Java
EXEC CICS HANDLE CONDITION ibmCics.handleCondition

Syntax

ibmCics.handleCondition ( <noHandle>, new CicsHandleConditionItem(CicsCondition.<responseCode>[, <labelNumber>] )... );
Note: one or multiple instances of the CicsHandleConditionItem class can be added.

Parameter(s)

<noHandle>
Optional boolean. If set to true, exceptions created by this command will be ignored.
<responseCode>
The CICS condition response code, see the CicsCondition enum for all available options. Includes ERROR, EOF, DUPREC, NOTOPEN, LENGERR and many others.
<labelNumber>
The integer value of the label to perform when the condition occurs. For programs the label variable and value are set in the base class.

Example(s)

COBOL Java
EXEC CICS
    HANDLE CONDITION
        ERROR(ERROR-HANDLING-SECTION)
        DUPREC(DUPLICATE-RECORDS-HANDLING)
        LENGERR
END-EXEC.
                
ibmCics.handleCondition(false, 
  new CicsHandleConditionItem(CicsCondition.ERROR, LABEL_ERROR_HANDLING_SECTION), 
  new CicsHandleConditionItem(CicsCondition.DUPREC, LABEL_DUPLICATE_RECORDS_HANDLING), 
  new CicsHandleConditionItem(CicsCondition.LENGERR));
                

Contents

 Go to top