I have a simple macro that checks for the existance of a Dataset (DATA01):
%GLOBAL base_exists;
%MACRO does_base_exist();
%IF %SYSFUNC(exist(DATA_01)) %THEN
%LET base_exists= 1;
%ELSE %LET base_exists= 0;
%MEND;
%does_base_exist();
%PUT Base exist check is &base_exists
The code above is indicated in a Program that is executed before my main Process. The outpu message reads:
"Base exist check is 1"
I have place a confition on my main process to only run when &base_exists is equal to 1 (Which it is). For some reason my main process keeps on failing stating that &base_exists does not exist.
Any ideas on what I'm doing wrong? I am new to EG and more used to working in BASE SAS.
UPDATE: I have appended a 's' to my errro &base_exists, for clarity sake.
&base_exists
-- with the S at the end. Make sure you have the name correct. – DomPazz