02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

See Also<br />

Function:<br />

SYSGET Function<br />

“PEEKCLONG Function” on page 271<br />

Returns the value of the specified operating-environment variable<br />

Category: Special<br />

z/<strong>OS</strong> specifics: operating-environment-variable<br />

Functions and CALL Routines under z/<strong>OS</strong> SYSGET Function 273<br />

See: SYSGET Function in <strong>SAS</strong> Language Reference: Dictionary<br />

Syntax<br />

SYSGET(operating-environment-variable)<br />

operating-environment-variable<br />

is the name of one of the parameters defined in the CLIST by which <strong>SAS</strong> was invoked.<br />

Details<br />

If the specified variable was not included in the <strong>SAS</strong> invocation, the error message<br />

“NOTE: Invalid argument to the function SYSGET” is generated and _ERROR_ is set to<br />

1.<br />

Although z/<strong>OS</strong> does not have native environment variables, you can use the SET<br />

option to define environment variables that are valid in your <strong>SAS</strong> session. SYSGET lets<br />

you retrieve these environment variables. If you are in interactive mode, SYSGET<br />

returns CLIST parameters. If you are in line mode, SYSGET returns the environment<br />

variables that are valid in your <strong>SAS</strong> session.<br />

Example<br />

The following example returns the system options that are specified in the OPTIONS<br />

parameter of the <strong>SAS</strong> CLIST and prints to the specified log:<br />

data _null_;<br />

opstr=sysget(’OPTIONS’);<br />

if _ERROR_ then put ’no options supplied’;<br />

else put ’options supplied are:’ optstr;<br />

run;<br />

See Also<br />

3 “SET= System Option” on page 498

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!