Previous Topic: $CAGLBL OPT=LOAD

Next Topic: $CAGLBL OPT=PURGE


$CAGLBL OPT=SAVE

Save a persistent global variable.

&CALL PROC=$CAGLBL    PARMS=(OPT=SAVE,
                      NAME=gname,DATA=data |
                      NAME=gname | (gname,...) |
                      NAME=gname | (gname,...), VARS=vname | (vname,.)
                     [,ENV=MACRO]
                     [,DEBUG=N | Y])

Operands:

OPT=SAVE

Specifies the SAVE function and creates a persistent global variable (PGV). Values of all global variables whose gnames are provided as arguments of NAME are saved in the external repository. Global variables without the current value (null) are not saved and existing external storage records related to them are purged.

A message is issued to the log for each variable saved with the value provided.

Note: The maximum number of persistent global variables that can be saved is limited to 999.

DATA=data

Specifies the data to be assigned to the global variable and saved.

VARS=vname

Specifies a name of the variable whose value will be assigned to the corresponding global variable gname.

ENV=Macro

Specifies that all the messages should be sent to an internal process log instead of OCS or Activity logs.

DEBUG=N|Y

When set to Y, initiates internal debugging of the $CAGLBL procedure. Should only be used with assistance from CA Technical Support.

Return Codes:

RETCODE

0 - Successful execution

8 - Unsuccessful execution

Examples:

&NAME = &STR ( $VARA , $VAR1 , VAR6, VARL )
&CALL PROC=$CAGLBL   PARMS=(OPT=SAVE,DEBUG=N,NAME=&NAME)

&&000LONG = ABCDEFGHIJKLMNOPQRSTUVWXYZ

&CALL PROC=$CAGLBL   PARMS=(OPT=SAVE,DEBUG=Y,NAME=LONG)