Hello i have a problem about with SAS connect when using %sysrput statement.
When i submit a code i work, but when i submit my code from macro it fails to work.
Here is the code:
dm log "clear";
options nosource nomprint;
%let SASMain = xx.xx.xxx.xx xxxx;
signon SASMain noscript user="***" password="********";
rsubmit sasmain MACVAR=SIGNONRETURNCODE;
options nosource;
%let error = 0;
data aaa;
set sashelp.class;
run;
%sysrput RemoteError = &error;
endrsubmit;
%put #### &RemoteError ####;
signoff;
%macro fromMacro;
%let SASMain = xx.xx.xxx.xx xxxx;
signon SASMain noscript user="***" password="********";
rsubmit sasmain MACVAR=SIGNONRETURNCODE;
options nosource;
%let error = 0;
data aaa;
set sashelp.class;
run;
%sysrput RemoteErrorFromMacro = &error;
endrsubmit;
%put #### &RemoteErrorFromMacro ####;
%mend fromMacro;
%fromMacro;
signoff;
Here is the log:
NOTE: Remote signon to SASMAIN commencing (SAS Release 9.01.01M3P020206).
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
Licensed to OMNITEL, Site 0088197007.
NOTE: This session is executing on the HP-UX B.11.23 platform.
NOTE: Running on HP Model ia64 Serial Number 4075303309.
NOTE: SAS 9.1.3 Service Pack 4
You are running SAS 9. Some SAS 8 files will be automatically converted
by the V9 engine; others are incompatible. Please see
http://support.sas.com/rnd/migration/planning/platform/64bit.html
PROC MIGRATE will preserve current SAS file attributes and is
recommended for converting all your SAS libraries from any
SAS 8 release to SAS 9. For details and examples, please see
http://support.sas.com/rnd/migration/index.html
This message is contained in the SAS news file, and is presented upon
initialization. Edit the file "news" in the "misc/base" directory to
display site-specific news and information in the program log.
The command line option "-nonews" will prevent this display.
NOTE: The paths specified with the UTILLOC option do not exist. UTILLOC=WORK will be used instead.
NOTE: SAS initialization used:
real time 0.14 seconds
cpu time 0.13 seconds
NOTE: Remote signon to SASMAIN complete.
NOTE: Remote submit to SASMAIN commencing.
1 options nosource;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.AAA has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds
NOTE: Remote submit to SASMAIN complete.
#### 0 ####
NOTE: Remote signoff from SASMAIN commencing.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 0.20 seconds
cpu time 0.16 seconds
NOTE: Remote signoff from SASMAIN complete.
NOTE: Remote signon to SASMAIN commencing (SAS Release 9.01.01M3P020206).
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
Licensed to OMNITEL, Site 0088197007.
NOTE: This session is executing on the HP-UX B.11.23 platform.
NOTE: Running on HP Model ia64 Serial Number 4075303309.
NOTE: SAS 9.1.3 Service Pack 4
You are running SAS 9. Some SAS 8 files will be automatically converted
by the V9 engine; others are incompatible. Please see
http://support.sas.com/rnd/migration/planning/platform/64bit.html
PROC MIGRATE will preserve current SAS file attributes and is
recommended for converting all your SAS libraries from any
SAS 8 release to SAS 9. For details and examples, please see
http://support.sas.com/rnd/migration/index.html
This message is contained in the SAS news file, and is presented upon
initialization. Edit the file "news" in the "misc/base" directory to
display site-specific news and information in the program log.
The command line option "-nonews" will prevent this display.
NOTE: The paths specified with the UTILLOC option do not exist. UTILLOC=WORK will be used instead.
NOTE: SAS initialization used:
real time 0.14 seconds
cpu time 0.13 seconds
NOTE: Remote signon to SASMAIN complete.
NOTE: Remote submit to SASMAIN commencing.
ERROR: %SYSRPUT statement is valid only when OPTION DMR is in effect.
1 options nosource;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.AAA has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: Remote submit to SASMAIN complete.
WARNING: Apparent symbolic reference REMOTEERRORFROMMACRO not resolved.
#### &RemoteErrorFromMacro ####
NOTE: Remote signoff from SASMAIN commencing.
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 0.20 seconds
cpu time 0.16 seconds
NOTE: Remote signoff from SASMAIN complete.