I tried running the following code today:
%let mapping_table=work.config;
proc lua restart;
submit "mapping_table=&mapping_table" ;
print(mapping_table)
endsubmit;
run;
Which resulted in:
ERROR: SUBMIT block:1: attempt to index global 'work' (a nil value)
Removing the period (.) resolves the issue.
Is this a bug? Or a feature?
SYSVLONG=9.04.01M3P062415
Try using single quotes around the macro variable in the SUBMIT statement:
%let mapping_table=work.config;
proc lua restart;
submit "mapping_table='&mapping_table'" ;
print(mapping_table)
endsubmit;
run;
Try using single quotes around the macro variable in the SUBMIT statement:
%let mapping_table=work.config;
proc lua restart;
submit "mapping_table='&mapping_table'" ;
print(mapping_table)
endsubmit;
run;
Another (more reliable) approach is to use sas.symput function:
%let mapping_table=work.config;
proc lua restart;
submit;
mapping_table = sas.symget('mapping_table')
print(mapping_table)
endsubmit;
run;
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 save with the early bird rate—just $795!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.