AMT Help Files
Home Development Command Translation CICS Commands HANDLE ABEND

HANDLE ABEND

COBOL Java
EXEC CICS HANDLE ABEND ibmCics.handleAbend

Syntax

ibmCics.handleAbend(new HandleAbendOptions()
  [.cancel(true)]
  [.reset(true)]
  [.cobolPerformAbend(<CobolPerform>)]
  [.handleAbendItem(new CicsHandleAidItem(CicsHandleAidOption.TRIGGER, <Label>, <Section>))]
  [.handleAbendItem(new CicsHandleAidItem(CicsHandleAidOption.TRIGGERPROGRAM, <Program>))]
  [.noHandle(true)]
);

Default or CANCEL option

ibmCics.handleAbend(new HandleAbendOptions()
  .cancel(true)
  [.noHandle(true)]
);

RESET option

ibmCics.handleAbend(new HandleAbendOptions()
  .reset(true)
  [.noHandle(true)]
);  

LABEL option

ibmCics.handleAbend(new HandleAbendOptions()
  .cobolPerformAbend(<CobolPerform>)
  .handleAbendItem(new CicsHandleAidItem(CicsHandleAidOption.TRIGGER, <Label>, <Section>))
  [.noHandle(true)]
);

PROGRAM option

ibmCics.handleAbend(new HandleAbendOptions()
  .cobolPerformAbend(<CobolPerform>)
  .handleAbendItem(new CicsHandleAidItem(CicsHandleAidOption.TRIGGERPROGRAM, <Program>))
  [.noHandle(true)]
);

Parameters

cancel
Boolean option to specify that previously set HANDLE ABEND request should be cancelled. This is the default option in COBOL if no option is specified.
reset
Boolean option to specify that previously canceled HANDLE ABEND request should be reactivated.
<CobolPerform>
The AMT Cobol Perform object, this is 'cobolPerformBase' in programs.
<CicsHandleAidOption>
The Aid option from the CicsHandleAidOption enum. TRIGGERPROGRAM to pass control to a program, TRIGGER for other handle abend options.
<Label>
The label to perform when the task ended abnormally.
<Section>
The section in the program where the label is located.
<Program>
The program to perform when the task ended abnormally.
noHandle
Optional Boolean. If set to true, exceptions created by this command will be ignored.

Examples

COBOL Java
EXEC CICS
    HANDLE ABEND
END-EXEC.
                
ibmCics.handleAbend(new HandleAbendOptions()
  .cancel(true)
);
                
EXEC CICS
    HANDLE ABEND
        RESET
END-EXEC.
                
ibmCics.handleAbend(new HandleAbendOptions()
  .reset(true)
);
                
EXEC CICS
    HANDLE ABEND
    LABEL (0100-ABEND-HANDLER)
END-EXEC.
                
ibmCics.handleAbend(new HandleAbendOptions()
  .cobolPerformAbend(cobolPerformBase)
  .handleAbendItem(new CicsHandleAidItem(CicsHandleAidOption.TRIGGER, LABEL_0100_ABEND_HANDLER, "MAIN"))
);
                
EXEC CICS
    HANDLE ABEND
    PROGRAM ('OOPS')
END-EXEC.
                
ibmCics.handleAbend(new HandleAbendOptions()
  .cobolPerformAbend(cobolPerformBase)
  .handleAbendItem(new CicsHandleAidItem(CicsHandleAidOption.TRIGGERPROGRAM, "OOPS"))
);
                
EXEC CICS
    HANDLE ABEND
        CANCEL
        NOHANDLE
END-EXEC.
                
ibmCics.handleAbend(new HandleAbendOptions()
  .cancel(true)
  .noHandle(true)
);
                

Contents

 Go to top