<?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 Re: %sysrput statement don't work from macro's in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/477229#M122873</link>
    <description>&lt;P&gt;I tried doing this too:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let abc_unix = &amp;amp;sd_exports.;&lt;BR /&gt;%nrstr(%%)sysrput abc_unix = &amp;amp;abc_unix.;&lt;/P&gt;&lt;P&gt;LIBNAME abc "&amp;amp;abc_unix.";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but that gave me this error:&amp;nbsp;LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jul 2018 19:41:45 GMT</pubDate>
    <dc:creator>astha8882000</dc:creator>
    <dc:date>2018-07-11T19:41:45Z</dc:date>
    <item>
      <title>%sysrput statement don't work from macro's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69431#M15061</link>
      <description>Hello i have a problem about with SAS connect when using %sysrput statement.&lt;BR /&gt;
When i submit a code i work, but when i submit my code from macro it fails to work.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Here is the code:&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
dm log "clear";&lt;BR /&gt;
options nosource nomprint;&lt;BR /&gt;
	&lt;BR /&gt;
	%let SASMain = xx.xx.xxx.xx xxxx;&lt;BR /&gt;
	signon SASMain noscript user="***" password="********";&lt;BR /&gt;
	&lt;BR /&gt;
	rsubmit sasmain MACVAR=SIGNONRETURNCODE;&lt;BR /&gt;
	&lt;BR /&gt;
	options nosource;&lt;BR /&gt;
	%let error = 0;&lt;BR /&gt;
	&lt;BR /&gt;
		data aaa;&lt;BR /&gt;
			set sashelp.class;&lt;BR /&gt;
		run;&lt;BR /&gt;
&lt;BR /&gt;
		%sysrput RemoteError = &amp;amp;error;&lt;BR /&gt;
	&lt;BR /&gt;
	endrsubmit;&lt;BR /&gt;
		%put #### &amp;amp;RemoteError ####;&lt;BR /&gt;
		&lt;BR /&gt;
	signoff;&lt;BR /&gt;
		&lt;BR /&gt;
%macro fromMacro;&lt;BR /&gt;
&lt;BR /&gt;
	%let SASMain = xx.xx.xxx.xx xxxx;&lt;BR /&gt;
	signon SASMain noscript user="***" password="********";&lt;BR /&gt;
	&lt;BR /&gt;
	rsubmit sasmain MACVAR=SIGNONRETURNCODE;&lt;BR /&gt;
	options nosource;&lt;BR /&gt;
	&lt;BR /&gt;
	%let error = 0;&lt;BR /&gt;
	&lt;BR /&gt;
	data aaa;&lt;BR /&gt;
		set sashelp.class;&lt;BR /&gt;
	run;&lt;BR /&gt;
	&lt;BR /&gt;
	%sysrput RemoteErrorFromMacro = &amp;amp;error;&lt;BR /&gt;
	&lt;BR /&gt;
	endrsubmit;&lt;BR /&gt;
	%put #### &amp;amp;RemoteErrorFromMacro ####;&lt;BR /&gt;
		&lt;BR /&gt;
%mend fromMacro;&lt;BR /&gt;
%fromMacro;&lt;BR /&gt;
signoff;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Here is the log:&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote signon to SASMAIN commencing (SAS Release 9.01.01M3P020206).&lt;BR /&gt;
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.&lt;BR /&gt;
NOTE: SAS (r) 9.1 (TS1M3)&lt;BR /&gt;
      Licensed to OMNITEL, Site 0088197007.&lt;BR /&gt;
NOTE: This session is executing on the HP-UX B.11.23 platform.&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Running on HP Model ia64 Serial Number 4075303309.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS 9.1.3 Service Pack 4&lt;BR /&gt;
&lt;BR /&gt;
You are running SAS 9. Some SAS 8 files will be automatically converted&lt;BR /&gt;
by the V9 engine; others are incompatible.  Please see&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/migration/planning/platform/64bit.html" target="_blank"&gt;http://support.sas.com/rnd/migration/planning/platform/64bit.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
PROC MIGRATE will preserve current SAS file attributes and is&lt;BR /&gt;
recommended for converting all your SAS libraries from any&lt;BR /&gt;
SAS 8 release to SAS 9.  For details and examples, please see&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/migration/index.html" target="_blank"&gt;http://support.sas.com/rnd/migration/index.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This message is contained in the SAS news file, and is presented upon&lt;BR /&gt;
initialization.  Edit the file "news" in the "misc/base" directory to&lt;BR /&gt;
display site-specific news and information in the program log.&lt;BR /&gt;
The command line option "-nonews" will prevent this display.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The paths specified with the UTILLOC option do not exist.  UTILLOC=WORK will be used instead.&lt;BR /&gt;
NOTE: SAS initialization used:&lt;BR /&gt;
      real time           0.14 seconds&lt;BR /&gt;
      cpu time            0.13 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote signon to SASMAIN complete.&lt;BR /&gt;
NOTE: Remote submit to SASMAIN commencing.&lt;BR /&gt;
1       options nosource;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;
NOTE: The data set WORK.AAA has 19 observations and 5 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.01 seconds&lt;BR /&gt;
      cpu time            0.02 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote submit to SASMAIN complete.&lt;BR /&gt;
#### 0 ####&lt;BR /&gt;
NOTE: Remote signoff from SASMAIN commencing.&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.20 seconds&lt;BR /&gt;
      cpu time            0.16 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote signoff from SASMAIN complete.&lt;BR /&gt;
NOTE: Remote signon to SASMAIN commencing (SAS Release 9.01.01M3P020206).&lt;BR /&gt;
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.&lt;BR /&gt;
NOTE: SAS (r) 9.1 (TS1M3)&lt;BR /&gt;
      Licensed to OMNITEL, Site 0088197007.&lt;BR /&gt;
NOTE: This session is executing on the HP-UX B.11.23 platform.&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Running on HP Model ia64 Serial Number 4075303309.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS 9.1.3 Service Pack 4&lt;BR /&gt;
&lt;BR /&gt;
You are running SAS 9. Some SAS 8 files will be automatically converted&lt;BR /&gt;
by the V9 engine; others are incompatible.  Please see&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/migration/planning/platform/64bit.html" target="_blank"&gt;http://support.sas.com/rnd/migration/planning/platform/64bit.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
PROC MIGRATE will preserve current SAS file attributes and is&lt;BR /&gt;
recommended for converting all your SAS libraries from any&lt;BR /&gt;
SAS 8 release to SAS 9.  For details and examples, please see&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/migration/index.html" target="_blank"&gt;http://support.sas.com/rnd/migration/index.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This message is contained in the SAS news file, and is presented upon&lt;BR /&gt;
initialization.  Edit the file "news" in the "misc/base" directory to&lt;BR /&gt;
display site-specific news and information in the program log.&lt;BR /&gt;
The command line option "-nonews" will prevent this display.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The paths specified with the UTILLOC option do not exist.  UTILLOC=WORK will be used instead.&lt;BR /&gt;
NOTE: SAS initialization used:&lt;BR /&gt;
      real time           0.14 seconds&lt;BR /&gt;
      cpu time            0.13 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote signon to SASMAIN complete.&lt;BR /&gt;
NOTE: Remote submit to SASMAIN commencing.&lt;BR /&gt;
&lt;B&gt;ERROR: %SYSRPUT statement is valid only when OPTION DMR is in effect.&lt;/B&gt;&lt;BR /&gt;
1     options nosource;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;
NOTE: The data set WORK.AAA has 19 observations and 5 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.01 seconds&lt;BR /&gt;
      cpu time            0.01 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote submit to SASMAIN complete.&lt;BR /&gt;
WARNING: Apparent symbolic reference REMOTEERRORFROMMACRO not resolved.&lt;BR /&gt;
#### &amp;amp;RemoteErrorFromMacro ####&lt;BR /&gt;
NOTE: Remote signoff from SASMAIN commencing.&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.20 seconds&lt;BR /&gt;
      cpu time            0.16 seconds&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Remote signoff from SASMAIN complete.</description>
      <pubDate>Thu, 15 Jan 2009 09:07:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69431#M15061</guid>
      <dc:creator>SAS_user</dc:creator>
      <dc:date>2009-01-15T09:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: %sysrput statement don't work from macro's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69432#M15062</link>
      <description>Hello,&lt;BR /&gt;
it seems to me, that you have to execute the macro definition in a RSUBMIT/ENDRSUBMIT block to get the desired result. See the SAS/Connect doc regarding Compute Services: /Using Compute Services/Macro Statements.&lt;BR /&gt;
"Macro statements that you include in a macro-generated RSUBMIT statement might get resolved and executed in the client session rather than in the server session, regardless of your including the statements in an RSUBMIT/ENDRSUBMIT statement block.The macro processor in the client session resolves variables that are specified in the following statements:&lt;BR /&gt;
 ... %SYSRPUT"&lt;BR /&gt;
A Programmin Technique, that might help you is stated under the topic:&lt;BR /&gt;
Server Session Execution: Macro Definition in an RSUBMIT Block.&lt;BR /&gt;
&lt;BR /&gt;
Good luck!&lt;BR /&gt;
&lt;BR /&gt;
/norbert</description>
      <pubDate>Thu, 15 Jan 2009 10:18:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69432#M15062</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-15T10:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: %sysrput statement don't work from macro's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69433#M15063</link>
      <description>Thank you Norbert,&lt;BR /&gt;
&lt;BR /&gt;
That was helpfull.&lt;BR /&gt;
&lt;BR /&gt;
I used &lt;BR /&gt;
&lt;BR /&gt;
%nrstr(%%)sysrput RemoteErrorFromMacro = &amp;amp;error;</description>
      <pubDate>Thu, 15 Jan 2009 12:26:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69433#M15063</guid>
      <dc:creator>SAS_user</dc:creator>
      <dc:date>2009-01-15T12:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: %sysrput statement don't work from macro's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69434#M15064</link>
      <description>Yes.  I think Norbert is correct.  The %sysrput statement must be remote submitted to a server session, so I believe it does need to be between in and rsubmit / endrsubmit block (at least all the examples I can find in the SAS Doc have it that way...!).</description>
      <pubDate>Thu, 15 Jan 2009 16:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/69434#M15064</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2009-01-15T16:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: %sysrput statement don't work from macro's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/477229#M122873</link>
      <description>&lt;P&gt;I tried doing this too:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let abc_unix = &amp;amp;sd_exports.;&lt;BR /&gt;%nrstr(%%)sysrput abc_unix = &amp;amp;abc_unix.;&lt;/P&gt;&lt;P&gt;LIBNAME abc "&amp;amp;abc_unix.";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but that gave me this error:&amp;nbsp;LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 19:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/477229#M122873</guid>
      <dc:creator>astha8882000</dc:creator>
      <dc:date>2018-07-11T19:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: %sysrput statement don't work from macro's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/477237#M122877</link>
      <description>I tried doing that too, that didn't help either:&lt;BR /&gt;&lt;BR /&gt;%let abc_unix = &amp;amp;sd_exports.&lt;BR /&gt;rsubmit;&lt;BR /&gt;%sysrput abc_unix = &amp;amp;abc_unix.;&lt;BR /&gt;endrsubmit;&lt;BR /&gt;LIBNAME abc "&amp;amp;abc_unix.";&lt;BR /&gt;&lt;BR /&gt;I get the following error: ERROR: The text expression &amp;amp;abc_UNIX. contains a recursive reference to the macro variable abc_UNIX. The macro variable will be assigned the null value.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jul 2018 20:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysrput-statement-don-t-work-from-macro-s/m-p/477237#M122877</guid>
      <dc:creator>astha8882000</dc:creator>
      <dc:date>2018-07-11T20:10:03Z</dc:date>
    </item>
  </channel>
</rss>

