Hi, I am basically new at SAS Enterprise Guide, so please bear with me. I am using EG 4.3. I have a process that runs on my Local machine. It prompts for three items: The Filename, the Month (MMM), and the Year (YY). This part works great. It then uses that information to find the file to read and then runs another process to do some checks on the file. (Example, it sorts and checks for duplicates.) If this goes well and the last check produces an empty file - then I want to upload my file to the Remote Machine. What I am trying to do is create a macro variable that I can read to determine if the file can be uploaded or not. So I added the following to the bottom of the last process: /* Test for conditional processing */ %let dsid=%sysfunc(open(saved.sort_check)); %let nobs=%sysfunc(attrn(&dsid,nobs)); %let rc=%sysfunc(close(&dsid)); /* The value of the column EMPTY_ ROWS will be used in the conditional processing node to determine which branch should be executed. */ data test_check (keep=empty_rows); length empty_rows $2; if &nobs = 0 then empty_rows = 'Y'; else do; empty_rows = 'N'; end; run; /* Create the macro variable that I can use to test with. */ DATA _NULL_; SET WORK.test_check; call symput('check',empty_rows); run; %put ✓ I right clicked on the next process (which is the upload process) and inserted the following Condition: This is what is under 'If the condition is true: "&check" equal to Y I get the following error: 1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 data _NULL_; rc = 0; 4 if "&check" = Y then WARNING: Apparent symbolic reference CHECK not resolved. 5 rc = 1; 6 CALL SYMPUT('_egrc', PUT(rc,1.)); 7 stop; 8 run; NOTE: Variable Y is uninitialized. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 9 10 QUIT; RUN; 11 How can I use a macro variable that I created in the program, inside the Conditional process? Thanks, Nancy :smileyplain:
... View more