Valid in: | client session |
The wildcard (*) can only be specified once in the character-string.
Read-only system options in the remote server are not over written.
The /REMOTE= and /LIKE= options are independent of each other and can be specified on the same %SYSLPUT statement, regardless of order.
%macro assignlib (runid); signon rem&runid; %syslput remid=&runid; rsubmit rem&runid; %macro dolib; %if (&remid eq 1) %then %do; libname mylib 'h:'; %end; %else %if (&remid eq 2) %then %do; libname mylib '/afs/some/unix/path'; %end; %mend; %dolib; endrsubmit; %mend;
_ALL_
in the %SYSLPUT statement to copy two macro variables, rc1 and rc2, to the server session. The %PUT statement in the RSUBMIT block
uses variable references, &rc1
and &rc2
, to display these variables and their values
in the SAS log. When the %PUT statements execute, the macro processor
resolves the expressions rc1=&rc1
and rc2=&rc2
to rc1=rem1
and rc2=rem2
, respectively, and displays them in the SAS
log.
_USER_
followed by LIKE=
’rc*’ in the %SYSLPUT statement
below, only the user-defined macro variables whose names begin with
the letters “rc” are copied to the server session. Since
the macro variable unixHost does not meet the pattern-matching criteria, it is not recognized
by the %PUT statement in the server session and a warning is displayed
in the log. The %PUT statements cause the expressions rc1=&rc1
and rc2=&rc2
to be displayed as rc1=rem1
and rc2=rem2
in the SAS log.
signon foo sascmd="sas"; %let rc1=rem1; %let rc2=rem2; %let unixHost=rem3; %syslput _user_/like='rc*' remote=host; rsubmit host; %put rc1=&rc1 /* writes rc1=rem1 to the log */ %put rc2=&rc2 /* writes rc2=rem2 to the log */ %put unixHost=&unixHost; /* generates WARNING: Apparent symbolic */ /* reference UNIXHOST not resolved. */ endrsubmit;
options autosignon; options sascmd="sas"; %let rc1=rem1; %let rc2=rem2; %let trc1=test1; %let trc2=test2; %syslput _global_/like='rc*' remote=host1; %syslput _global_/like='trc*' remote=host2; Rsubmit host1; %put rc1=&rc1; %put rc2=&rc2; Endrsubmit; Rsubmit host2; %put trc1=&trc1; %put trc2=&trc2; Endrsubmit;