ILE COBOL Language Reference


CANCEL Statement

The CANCEL statement ensures that the next time the referenced subprogram is called it will be entered in its initial state.

CANCEL Statement - Format
 
>>-CANCEL------------------------------------------------------->
 
   .--------------------------------------------------------------.
   V                                                              |
>----+-identifier-1----------------------+--| In Library Phrase |-+-><
     '-+--------------------+--literal-1-'
       '-| Linkage Phrase |-'
 
Linkage Phrase:
 
|--+--------------------------------------------------------+---|
   |         (1)                                            |
   +-LINKAGE-------+------+--+----+--+-environment-name-1-+-+
   |               '-TYPE-'  '-IS-'  +-PROGRAM------------+ |
   |                                 '-PROCEDURE----------' |
   |         (1)                                            |
   +-PROGRAM------------------------------------------------+
   |           (1)                                          |
   '-PROCEDURE----------------------------------------------'
 
In Library Phrase:
 
|--+----------------------------------------+-------------------|
   |                 (1)                    |
   '-+----+--LIBRARY-------+-identifier-2-+-'
     '-IN-'                '-literal-2----'
 
 

Notes:

  1. IBM Extension

literal-1
The name of the subprogram to be canceled. Literal-1 can contain an extended name. The CANCEL linkage determines the type of program to be canceled and thus also restricts the content and size of literal-1. The linkage made is either to a program object or an ILE procedure. If the linkage is to a program object, then literal-1 must be nonnumeric, uppercase (except for an extended system name), and must conform to the rules for formation of program-names. The first 10 characters of the literal are used to make the correspondence between the calling program and the called subprogram.

If the linkage is to an ILE procedure, then literal-1 must be nonnumeric and at most 250 characters long. Depending on the compiler option *MONOPRC, literal-1 might need to be uppercase and conform to the rules for formation of program-names. The literal must specify the program-name of the called subprogram.

identifier-1
Must be an alphanumeric data item where the following rules apply:

Each literal or contents of the identifier specified in the CANCEL statement must be the same as the literal or contents of the identifier specified in an associated CALL statement.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]