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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.