Hi,
I have the following code that logs me into our Linux machine and does a rsubmit.
I want to get the Environmental variable for what (MMM) stands for on our Linux machine.
But I get the following error: WARNING: The argument to macro function %SYSGET is not defined as a system variable.
Can it not resolve this over there?
Here is the code that I am using:
%let linux1=our.machine.com 1234;
Options comamid=tcp remote=linux1;
** Point to the script you wish to use to connect to the remote host;
Filename RLINK 'M:\ADC-P\\sas\linux\tcpunix.scr';
Signon linux1;
data _null_;
call symput('monyr',"&mth.&yr.");
run;
%put the value being passed is &monyr;
rsubmit;
%sysrput rsysver = Remote SAS version number is &sysver..;
%sysrput monthtest = %sysget(MMM);
endrsubmit;
* Library on Linux machine;
libname mysas "/our/dir/sas/&monyr" server=linux1;
%put &rsysver;
%put &monthtest;
Signoff;
This is the log:
NOTE: SAS initialization used:
real time 0.07 seconds
cpu time 0.02 seconds
NOTE: Remote signon to LINUX1 complete.
463
464 data _null_;
465 call symput('monyr',"&mth.&yr.");
466 run;
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
467 %put the value being passed is &monyr;
the value being passed is apr10
468
469 rsubmit;
NOTE: Remote submit to LINUX1 commencing.
1 %sysrput rsysver = Remote SAS version number is &sysver..;
2 %sysrput monthtest = %sysget(MMM);
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
NOTE: Remote submit to LINUX1 complete.
470
471 * Library on Linux machine;
472 libname mysas "/cpspb/dev/sas/&monyr" server=linux1;
NOTE: Libref MYSAS was successfully assigned as follows:
Engine: REMOTE
Physical Name: /cpspb/dev/sas/apr10
473
474 %put &rsysver;
Remote SAS version number is 9.2.
475 %put &monthtest;
476 Signoff;
NOTE: Remote signoff from LINUX1 commencing.
NOTE: Libref MYSAS has been deassigned.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 0.48 seconds
cpu time 0.03 seconds
NOTE: Script file 'tcpunix.scr' entered.
NOTE: Remote signoff from LINUX1 complete.
---------------------------------------------------------------------------
If I am on the Linux machine and use %sysget inside a program, it gives me 'apr'.
Thanks for any help in understanding this.
Nancy