Chapter Contents

Previous

Next
GETEXEC

GETEXEC



Returns the value of an EXEC variable

CMS specifics: all


Syntax
Details
Example
See Also

Syntax

GETEXEC ('argument')

'argument'
is the name of the EXEC variable. It must be uppercased and enclosed in quotes.


Details

The GETEXEC function is a SAS DATA step function that returns the value of an EXEC variable. The EXEC must be written in EXEC2 or REXX.

Here are some points to consider when you are using the GETEXEC function:

If an EXEC2 variable name used as an argument to GETEXEC does not exist, the GETEXEC function returns a missing value. If a REXX variable name that was used as an argument to the GETEXEC function does not exist, the GETEXEC function returns the name of the variable. For either EXEC2 or REXX, if the variable has a null value or a value of all blanks, GETEXEC returns a missing value.


Example

The following statement assigns the value of the EXEC variable LABEL to the SAS variable DISKID:

diskid=getexec('LABEL');

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.