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;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.