Hello guys,
I hope this message finds you well.
I am currently running a "call execute" function through SAS enterprise guide. For whatever reason, when i compile and run the package as a whole i face the following ERROR: THe annoying bit is that if i have to perform a debug exercise, i.e. run all codes one step at a time, i face no issues. I reckon this is some option setting.
data _NULL_;
MPRINT(ANALYSEDELIVERYDS): length output_mart_name $50. obs_period $3.;
MPRINT(ANALYSEDELIVERYDS): set defsrcdt24;
403 The SAS System 19:13 Thursday, April 7, 2016
MPRINT(ANALYSEDELIVERYDS): output_mart_name=compress(substr(cats("DQ_24M",substr("APSM",1,8),compress(martgen,"/\-")),1,24));
MPRINT(ANALYSEDELIVERYDS): call execute('%DEFAULTDEF(ds =
WORK.'||compress(output_mart_name)||',output_excluded='||cats(substr(output_mart_name,1,27),"_excl")||', cod_generation
='||compress(defaultgen)||', observation_period = 24, probation_period = 0);');
MPRINT(ANALYSEDELIVERYDS): call symputx(cats('aaa24',_N_),output_mart_name);
NOTE: Line generated by the invoked macro "ANALYSEDELIVERYDS".
10290 compress(_N_)||' as select distinct "aaa24'||compress(_N_)||'" as tmp, "24M" as obs_period, cod_generation as cod_gen,
10290 ! count(1) as counts, sum(default) as totaldef from '||compress(output_mart_ run; data tempdefall12_24; set
ERROR 388-185: Expecting an arithmetic operator.
ERROR 76-322: Syntax error, statement will be ignored.
I noticed that my proc sql statement execute through "CALL EXECUTE" is truncated - THe truncated section is underlined and made bold in red above. I even referred the complete bit of this code in the code window below (highlighted in red).
the original code loooks like this:
data _NULL_;
length output_mart_name $50. obs_period $3.;
set defsrcdt24;
output_mart_name=compress(substr(cats("DQ_24M",substr("&sc.",1,8),compress(martgen,"/\-")),1,24));
call execute('%DEFAULTDEF(ds = WORK.'||compress(output_mart_name)||',output_excluded='||cats(substr(output_mart_name,1,27),"_excl")||', cod_generation ='||compress(defaultgen)||', observation_period = 24, probation_period = 0);');
call symputx(cats('aaa24',_N_),output_mart_name);
call execute('proc sql; create table &workspde..tempdef24'||compress(_N_)||' as select distinct "aaa24'||compress(_N_)||'" as tmp, "24M" as obs_period, cod_generation as cod_gen, count(1) as counts, sum(default) as totaldef from '||compress(output_mart_name)||'; quit;');
run;
Please do let me know.
thanks.
Sebastian
Hello,
I guess you are running your code thru batch file and you use an %include statement to bring the code to SAS.
In this case you shall increase the length of characters the %include statement reads:
%include "c:\myfiles\mySASsource" / lrecl=500;
Possibly your source code gets truncated due to what is described in usage note usage note 4448. Try and break up your lines.
Regards,
- Jan.
Yes literally pasted from the link I gave in my answer. Chosen solution nevertheless.
Hello,
I guess you are running your code thru batch file and you use an %include statement to bring the code to SAS.
In this case you shall increase the length of characters the %include statement reads:
%include "c:\myfiles\mySASsource" / lrecl=500;
@jklaverstijn already answerred 🙂
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.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.