<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Logging onto the Linux machine from PC and get an Environmental variable in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Logging-onto-the-Linux-machine-from-PC-and-get-an-Environmental/m-p/10865#M1128</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have the following code that logs me into our Linux machine and does a rsubmit.&lt;BR /&gt;
&lt;BR /&gt;
I want to get the Environmental variable for what (MMM) stands for on our Linux machine.&lt;BR /&gt;
But I get the following error:  WARNING: The argument to macro function %SYSGET is not defined as a system variable.&lt;BR /&gt;
&lt;BR /&gt;
Can it not resolve this over there?&lt;BR /&gt;
&lt;BR /&gt;
Here is the code that I am using:&lt;BR /&gt;
&lt;BR /&gt;
%let linux1=our.machine.com 1234; &lt;BR /&gt;
&lt;BR /&gt;
Options comamid=tcp remote=linux1;&lt;BR /&gt;
&lt;BR /&gt;
** Point to the script you wish to use to connect to the remote host;&lt;BR /&gt;
Filename RLINK 'M:\ADC-P\\sas\linux\tcpunix.scr';&lt;BR /&gt;
Signon linux1;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	  call symput('monyr',"&amp;amp;mth.&amp;amp;yr.");&lt;BR /&gt;
run;&lt;BR /&gt;
%put the value being passed is &amp;amp;monyr;&lt;BR /&gt;
&lt;BR /&gt;
rsubmit;&lt;BR /&gt;
	%sysrput rsysver = Remote SAS version number is &amp;amp;sysver..;&lt;BR /&gt;
	%sysrput monthtest = %sysget(MMM);&lt;BR /&gt;
endrsubmit;&lt;BR /&gt;
&lt;BR /&gt;
* Library on Linux machine;&lt;BR /&gt;
libname mysas "/our/dir/sas/&amp;amp;monyr" server=linux1;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;rsysver;&lt;BR /&gt;
%put &amp;amp;monthtest;&lt;BR /&gt;
Signoff;&lt;BR /&gt;
&lt;BR /&gt;
This is the log:&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS initialization used:&lt;BR /&gt;
      real time           0.07 seconds&lt;BR /&gt;
      cpu time            0.02 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote signon to LINUX1 complete.&lt;BR /&gt;
463&lt;BR /&gt;
464  data _null_;&lt;BR /&gt;
465        call symput('monyr',"&amp;amp;mth.&amp;amp;yr.");&lt;BR /&gt;
466  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
467  %put the value being passed is &amp;amp;monyr;&lt;BR /&gt;
the value being passed is apr10&lt;BR /&gt;
468&lt;BR /&gt;
469  rsubmit;&lt;BR /&gt;
NOTE: Remote submit to LINUX1 commencing.&lt;BR /&gt;
1        %sysrput rsysver = Remote SAS version number is &amp;amp;sysver..;&lt;BR /&gt;
2        %sysrput monthtest = %sysget(MMM);&lt;BR /&gt;
WARNING: The argument to macro function %SYSGET is not defined as a system variable.&lt;BR /&gt;
NOTE: Remote submit to LINUX1 complete.&lt;BR /&gt;
470&lt;BR /&gt;
471  * Library on Linux machine;&lt;BR /&gt;
472  libname mysas "/cpspb/dev/sas/&amp;amp;monyr" server=linux1;&lt;BR /&gt;
NOTE: Libref MYSAS was successfully assigned as follows:&lt;BR /&gt;
      Engine:        REMOTE&lt;BR /&gt;
      Physical Name: /cpspb/dev/sas/apr10&lt;BR /&gt;
473&lt;BR /&gt;
474  %put &amp;amp;rsysver;&lt;BR /&gt;
Remote SAS version number is 9.2.&lt;BR /&gt;
475  %put &amp;amp;monthtest;&lt;BR /&gt;
&lt;BR /&gt;
476  Signoff;&lt;BR /&gt;
NOTE: Remote signoff from LINUX1 commencing.&lt;BR /&gt;
NOTE: Libref MYSAS has been deassigned.&lt;BR /&gt;
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414&lt;BR /&gt;
NOTE: The SAS System used:&lt;BR /&gt;
      real time           0.48 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Script file 'tcpunix.scr' entered.&lt;BR /&gt;
NOTE: Remote signoff from LINUX1 complete.&lt;BR /&gt;
&lt;BR /&gt;
---------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
If I am on the Linux machine and use %sysget inside a program, it gives me 'apr'.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any help in understanding this.&lt;BR /&gt;
Nancy</description>
    <pubDate>Tue, 27 Apr 2010 15:36:11 GMT</pubDate>
    <dc:creator>SASHunter</dc:creator>
    <dc:date>2010-04-27T15:36:11Z</dc:date>
    <item>
      <title>Logging onto the Linux machine from PC and get an Environmental variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Logging-onto-the-Linux-machine-from-PC-and-get-an-Environmental/m-p/10865#M1128</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have the following code that logs me into our Linux machine and does a rsubmit.&lt;BR /&gt;
&lt;BR /&gt;
I want to get the Environmental variable for what (MMM) stands for on our Linux machine.&lt;BR /&gt;
But I get the following error:  WARNING: The argument to macro function %SYSGET is not defined as a system variable.&lt;BR /&gt;
&lt;BR /&gt;
Can it not resolve this over there?&lt;BR /&gt;
&lt;BR /&gt;
Here is the code that I am using:&lt;BR /&gt;
&lt;BR /&gt;
%let linux1=our.machine.com 1234; &lt;BR /&gt;
&lt;BR /&gt;
Options comamid=tcp remote=linux1;&lt;BR /&gt;
&lt;BR /&gt;
** Point to the script you wish to use to connect to the remote host;&lt;BR /&gt;
Filename RLINK 'M:\ADC-P\\sas\linux\tcpunix.scr';&lt;BR /&gt;
Signon linux1;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	  call symput('monyr',"&amp;amp;mth.&amp;amp;yr.");&lt;BR /&gt;
run;&lt;BR /&gt;
%put the value being passed is &amp;amp;monyr;&lt;BR /&gt;
&lt;BR /&gt;
rsubmit;&lt;BR /&gt;
	%sysrput rsysver = Remote SAS version number is &amp;amp;sysver..;&lt;BR /&gt;
	%sysrput monthtest = %sysget(MMM);&lt;BR /&gt;
endrsubmit;&lt;BR /&gt;
&lt;BR /&gt;
* Library on Linux machine;&lt;BR /&gt;
libname mysas "/our/dir/sas/&amp;amp;monyr" server=linux1;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;rsysver;&lt;BR /&gt;
%put &amp;amp;monthtest;&lt;BR /&gt;
Signoff;&lt;BR /&gt;
&lt;BR /&gt;
This is the log:&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS initialization used:&lt;BR /&gt;
      real time           0.07 seconds&lt;BR /&gt;
      cpu time            0.02 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote signon to LINUX1 complete.&lt;BR /&gt;
463&lt;BR /&gt;
464  data _null_;&lt;BR /&gt;
465        call symput('monyr',"&amp;amp;mth.&amp;amp;yr.");&lt;BR /&gt;
466  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
467  %put the value being passed is &amp;amp;monyr;&lt;BR /&gt;
the value being passed is apr10&lt;BR /&gt;
468&lt;BR /&gt;
469  rsubmit;&lt;BR /&gt;
NOTE: Remote submit to LINUX1 commencing.&lt;BR /&gt;
1        %sysrput rsysver = Remote SAS version number is &amp;amp;sysver..;&lt;BR /&gt;
2        %sysrput monthtest = %sysget(MMM);&lt;BR /&gt;
WARNING: The argument to macro function %SYSGET is not defined as a system variable.&lt;BR /&gt;
NOTE: Remote submit to LINUX1 complete.&lt;BR /&gt;
470&lt;BR /&gt;
471  * Library on Linux machine;&lt;BR /&gt;
472  libname mysas "/cpspb/dev/sas/&amp;amp;monyr" server=linux1;&lt;BR /&gt;
NOTE: Libref MYSAS was successfully assigned as follows:&lt;BR /&gt;
      Engine:        REMOTE&lt;BR /&gt;
      Physical Name: /cpspb/dev/sas/apr10&lt;BR /&gt;
473&lt;BR /&gt;
474  %put &amp;amp;rsysver;&lt;BR /&gt;
Remote SAS version number is 9.2.&lt;BR /&gt;
475  %put &amp;amp;monthtest;&lt;BR /&gt;
&lt;BR /&gt;
476  Signoff;&lt;BR /&gt;
NOTE: Remote signoff from LINUX1 commencing.&lt;BR /&gt;
NOTE: Libref MYSAS has been deassigned.&lt;BR /&gt;
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414&lt;BR /&gt;
NOTE: The SAS System used:&lt;BR /&gt;
      real time           0.48 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Script file 'tcpunix.scr' entered.&lt;BR /&gt;
NOTE: Remote signoff from LINUX1 complete.&lt;BR /&gt;
&lt;BR /&gt;
---------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
If I am on the Linux machine and use %sysget inside a program, it gives me 'apr'.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any help in understanding this.&lt;BR /&gt;
Nancy</description>
      <pubDate>Tue, 27 Apr 2010 15:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Logging-onto-the-Linux-machine-from-PC-and-get-an-Environmental/m-p/10865#M1128</guid>
      <dc:creator>SASHunter</dc:creator>
      <dc:date>2010-04-27T15:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Logging onto the Linux machine from PC and get an Environmental variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Logging-onto-the-Linux-machine-from-PC-and-get-an-Environmental/m-p/10866#M1129</link>
      <description>run the usual commands to verify the environment var exists&lt;BR /&gt;
In the remote sas session, run the code&lt;BR /&gt;
x set ;&lt;BR /&gt;
Or package it into a filename pipe and prove that MMM exists</description>
      <pubDate>Tue, 27 Apr 2010 21:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Logging-onto-the-Linux-machine-from-PC-and-get-an-Environmental/m-p/10866#M1129</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-04-27T21:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Logging onto the Linux machine from PC and get an Environmental variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Logging-onto-the-Linux-machine-from-PC-and-get-an-Environmental/m-p/10867#M1130</link>
      <description>This is what I had previously executed on the Linux :&lt;BR /&gt;
&lt;BR /&gt;
/cpspb/dev/work&amp;gt; print $MMM&lt;BR /&gt;
apr&lt;BR /&gt;
&lt;BR /&gt;
and if I do the SET statement I see:   MMM=apr&lt;BR /&gt;
&lt;BR /&gt;
so why does it not resolve when I sign on to the Linux through RSUBMIT?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Nancy</description>
      <pubDate>Wed, 28 Apr 2010 12:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Logging-onto-the-Linux-machine-from-PC-and-get-an-Environmental/m-p/10867#M1130</guid>
      <dc:creator>SASHunter</dc:creator>
      <dc:date>2010-04-28T12:03:13Z</dc:date>
    </item>
  </channel>
</rss>

