I'm trying to capture Environment Variables that are defined in a SMC Flow
Below is a screen shot of a SMC Flow that I manually set the Environment Variable "TEST" to 123.
This Flow calls a SAS Program via an SMC Deployed Job.
Question: Is it possible for the SAS program to capture \ parse this environment variable?
The %SYSGET macro function can retrieve the value of system environment variables.
%let val = %sysget(TEST);
The %SYSGET macro function can retrieve the value of system environment variables.
%let val = %sysget(TEST);
Chris,
Thank you. That worked like a charm.
I was using an incorrect method (%sysfunc(getoption(TEST)))
Regards,
Troy
@tborange wrote:
Chris,
Thank you. That worked like a charm.
I was using an incorrect method (%sysfunc(getoption(TEST)))
Regards,
Troy
The GETOPTION function only can get SAS system or graphics options such as are set with the OPTIONS or GOPTIONS statements. While the value of an environment variable might be able to set the value of an option you would have to query the for the Option that was set to see the value with Getoption.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: