LIB$SET_SYMBOL

This routine sets the value of a symbol belonging to the current command processor. This library routine is VMS-specific and should never be used on other machines.

Usage

CALL "LIB$SET_SYMBOL"
    USING SYM-NAME, SYM-VALUE, SYM-LOCATION

Parameters

SYM-NAME PIC X(n) USAGE DISPLAY The first parameter is the symbol's name. This name has trailing spaces removed and is converted to upper case.
SYM-VALUE PIC X(n) or PIC 9(n) USAGE DISPLAY The second parameter is the value to assign to the symbol. This is not converted to upper case, but does have trailing spaces removed.
SYM-LOCATION PIC X or PIC 9 USAGE DISPLAY (optional) The third parameter is optional. It should be a 1 to set the symbol in the local symbol table. It should be a 2 to use the global symbol table. If this parameter is omitted, the local table is used.

This routine does not report any error conditions. See the VMS System Routines manual for details on VMS-specific routines.

Comments

It is possible to set a symbol's value from ACUCOBOL-GT using the SYSTEM library routine, but when you do this, the symbol's value immediately resets to its previous value as soon as the SYSTEM call is complete. This is because the SYSTEM routine starts another command processor which maintains its own set of symbols.