Date: Fri, 23 Jun 2006 12:33:18 -0700
Reply-To: "Pardee, Roy" <pardee.r@GHC.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pardee, Roy" <pardee.r@GHC.ORG>
Subject: Re: Implied endrsubmit
Content-Type: text/plain; charset="us-ascii"
This might be too hacky, but could you do something like %include a
local file, which will exist on all the relevant machines, but contain
the signon/rsubmit lines only on the dev box? Or maybe you could get
fancy & test for its existence first & do the %include only if its
I find that, running in batch mode, an explicit endrsubmit & signoff is
not necessary--when sas runs out of statements to run it takes the hint
& signs off/closes down as appropriate.
I do something similar here, b/c I run on a laptop that isn't always
connected to a network. I've got a little 'set environment' vbscript
that I run periodically, which just copies one of
Over top of the file:
Depending on whether it can 'see' a particular share that's only visible
when I'm connected. I have %include "init_stuff.sas" ; as part of my
standard program header, so at runtime, that file is always read in. If
I'm connected, my stuff runs remotely, otherwise it's local. It works
well for me...
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Friday, June 23, 2006 12:09 PM
Subject: Re: Implied endrsubmit
Hi Scott -
SAS implies an endrsubmit after any block of code submitted, and the
'rsubmit;' in initstmt='signon;rsubmit;' is seen as a complete block of
For example, if I highlight 'rsubmit;' in the editor by itself and run
it with f3 I see this in the log:
NOTE: Remote submit to HHSDC commencing.
NOTE: Remote submit to HHSDC complete.
I think you may be stuck using something along this line:
-initstmt='signon; %let start=rsubmit; %let end=endrsubmit;' -sysin
and bracketing the batch file with &start; and &end;
One note though, if one has an rsubmit statement and code in two files
and %include them in a single submit the rsubmit will stay in effect in
the execution of the second %include. So you could potentially move
everything to the initstmt and just discard the sysin.
-initstmt='signon; %inc(rsubfile); %inc(batchfile);' for remote
processing vs -initstmt='signon; %inc(batchfile);' for local processing.
DDS Data Extraction
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> Sent: Thursday, June 22, 2006 7:13 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Implied endrsubmit
> Summary of my development environment and desired objectives:
> * two environments, "dev" and "prod"
> * For dev, I need to remote submit the code to a server machine
> the necessary SAS modules. So, my PC SAS is just a client to the
> * For prod, the code runs on the machine to which it has been
> * Both local and remote machines are Windows based.
> * I want the IDENTICAL code (if possible) to be run in both dev and
> What I tried was (batch processing):
> "C:\Program Files\SAS\SAS 9.1\sas.exe"
> -CONFIG "\\path_to_config\SASV913.CFG"
> -autoexec "\\path_to_autoexec\autoexec.sas"
> -sasuser "path_to_batch_sasuser_directory\Batch"
> -nocenter -noovp -icon -nosplash -batch -noterminal -no$syntaxcheck
> -log \\path_to_log_directory -sysparm DEV -initstmt='signon;rsubmit;'
> -sysin "%name_of_batch_file"
> The two key lines are the last two.
> There is an implied endrsubmit after the initstmt. If my batch file
> data _null_;
> The log reads (excerpt):
> NOTE: Remote submit to IPADDR commencing. <<< rsubmit from initstmt
> NOTE: Remote submit to IPADDR complete. <<< implied endrsubmit
> 1 data _null_; <<< beginning of batch
> 2 run;
> NOTE: DATA statement used (Total process time):
> real time 0.01 seconds
> user cpu time 0.00 seconds
> system cpu time 0.00 seconds
> Memory 146k
> The data step ran on my local machine, not the remote machine.
> Should I have expected this implied endrsubmit at the end of the
> Do you have any additional ideas on how to implement this development
> environment? I know I could write a macro at the beginning of the
> program that has a conditional rsubmit statement if running in the
> development environment, but 1) I'm coding to support my development
> environment rather than the needs of the production environment, 2)
> like to submit the same code in DMS, which wants an endrsubmit at the
> of the program, and 3) it just gets messy.
> It would be nice if SAS just ran the code I submitted, rather than the
> code it thinks I meant. SAS is taking a page out of Microsoft's book
> one :-/