BookmarkSubscribeRSS Feed
Asbon
Obsidian | Level 7

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.

1 REPLY 1
s_lassen
Meteorite | Level 14

The STATUS= option is not a valid option for %INCLUDE, that's probably why you get the error. Where did you see that option?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 560 views
  • 0 likes
  • 2 in conversation