Hi,
I'm having below code, but getting error by using % include statment for calling sas code, where i'm using status to get status of process. Help is appreciated.
options sascmd="sas";
signon Ora1;
rsubmit Ora1 wait=no;
%include '/sasdata/cro_rte/user_libs/crm_prod/aasbon/systask/BT_Fraud_Model_Driver1/Ora1.sas' status=auths;
%put &auths.;
endrsubmit;
signon Ora2;
rsubmit Ora2 wait=no;
%include '/sasdata/cro_rte/user_libs/crm_prod/aasbon/systask/BT_Fraud_Model_Driver1/Ora2.sas' status=trgrs;
%put &trgrs.;
endrsubmit;
waitfor _all_;
signoff _all_;
data _null_;
if ((&auths > 4) or (&trgrs > 4)) then do;
if &auths > 4 then do;
putlog 'ERROR occured during the execution of Ora1.sas';
abort cancel;
end;
if &trgrs > 4 then do;
putlog 'ERROR occured during the execution of Ora2.sas';
abort cancel;
end;
end;
run;
Error:-
ERROR: Incorrect %INCLUDE statement will not be executed. There is a syntax error.
Thanks,
Kenneth.
The STATUS= option is not a valid option for %INCLUDE, that's probably why you get the error. Where did you see that option?
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.