Assigns a value to an EXEC variable
CALL PUTEXEC ('argument1', argument2);
- is the name of an EXEC variable. This argument
must be uppercased and enclosed in single quotes.
- is the value to be assigned. This argument
can be specified as a literal or a variable name. If you specify a literal,
it must be enclosed in single quotes.
The PUTEXEC CALL routine assigns a value
to an EXEC variable. The EXEC must be written in EXEC2 or REXX. To use the
PUTEXEC CALL routine effectively, you must be familiar with one of these languages.
If the variable that you specify as argument1 does not currently exist as an
EXEC variable, it is created.
Here are some points to consider when using the PUTEXEC
- All EXEC variable names specified as arguments
for PUTEXEC must be uppercased. This is true for REXX as well as EXEC2, even
though REXX makes no distinction between upper- and lowercase in its variable
names. If you specify a REXX compound symbol, such as NAME.1, as an argument,
only the stem (the part of the name preceding the period) must be in uppercase.
- Although EXEC2 variables always begin with an
ampersand (&), you must omit the ampersand when you use the name as an
- The CMS EXEC processor hides all variables except
those in the current EXEC. Hidden variables are not accessible by PUTEXEC.
- Arguments to PUTEXEC must be character values,
and the values of EXEC variables, even numeric values, are always retained
in character format. By default, SAS converts values automatically from numeric
to character or character to numeric. However, it is better to use the DATA
step functions INPUT and PUT to convert character values from EXEC variables
to a specific numeric format, and vice versa.
- If the interface to EXEC variables fails, PUTEXEC
assumes that its arguments are invalid (because no EXEC variables can be accessed),
and a message is written to the SAS log.
See Using the PUTEXEC CALL Routine
for information and examples. Also, refer to the IBM VM/ESA REXX/VM
Reference and VM/ESA REXX/VM User's Guide. If you are
not familiar with EXEC2, refer to the IBM VM/SP EXEC 2 Reference.
The following statement specifies the
literal USR191 as the value to assign to the EXEC variable LABEL:
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.