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----'
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.
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.