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 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 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.