In order to resolve a macro variable when you use SAS/CONNECT, the macro variable must exist on the host on which it is referenced. If it does not, then the warning message, "Apparent symbolic reference not resolved," is issued.
This warning occurs most often when the macro variable is created on the local host, but is referenced on the remote host. Usually, if the creation of the macro variable comes before the RSUBMIT statement, then the macro variable exists only on the local side.
To make the macro variable available on the remote host, you need to use %SYSLPUT, which creates a new macro variable on the remote host. Here is the syntax:
%SYSLPUT macro-variable=<value>
SAS
® 9 and greater syntax (also see
Usage Note 15985, "Using %syslput in SAS 9 may require use of the %bquote function"):
%SYSLPUT macro-variable=<value </remote=server-id>>
If the macro variable X that resides on the local host needs to be created on the remote host, then the following syntax is used:
%SYSLPUT X=&X;
The inverse of %SYSLPUT is %SYSRPUT. %SYSRPUT creates a new macro variable on the local host from the remote host. The syntax is the same:
%SYSRPUT macro-variable=;
This warning message also commonly occurs when the creation of the macro variable and reference comes after the RSUBMIT statement. Consider the following example:
%macro test;
%put &sysscp;
rsubmit;
%let x=100;
data new;
put "&x";
run;
%put &sysscp;
endrsubmit;
%mend test;
%test
In this example, the %LET that creates the macro variable X is COMPILED CODE and is executed on the local host, but the reference to the macro variable is TEXT and is executed on the remote host. To force the %LET X= to be seen as text, the %NRSTR function can be used to prevent the macro processor from interpreting a macro statement that is within the RSUBMIT statement in the local session. Instead, the macro statement is interpreted and used in the remote session. Here is the syntax:
%macro test;
%put &sysscp;
rsubmit;
%nrstr(%let x=100;)
data new;
put "&x";
run;
%put &sysscp;
endrsubmit;
%mend test;
%test
To find a more detailed explanation on how macro and CONNECT interact see the SAS/CONNECT® 9.4 User's Guide, Fourth Edition, link below:
https://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#n1wm9969gdtuijn195n1o7uaqp87.htm
Operating System and Release Information
SAS System | Base SAS | All | n/a | |
SAS System | SAS/CONNECT | All | n/a | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.