LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
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 found?

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

Init_stuff.sas.CONNECTED Init_stuff.sas.NOTCONNECTED

Over top of the file:

Init_stuff.sas

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...

HTH,

-Roy

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Choate, Paul@DDS Sent: Friday, June 23, 2006 12:09 PM To: SAS-L@LISTSERV.UGA.EDU 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 code.

For example, if I highlight 'rsubmit;' in the editor by itself and run it with f3 I see this in the log: 226 rsubmit; 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 "%name_of_batch_file"

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.

hth

Paul Choate DDS Data Extraction (916) 654-2160

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Scott > Bass > Sent: Thursday, June 22, 2006 7:13 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Implied endrsubmit > > Hi, > > 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 containing > the necessary SAS modules. So, my PC SAS is just a client to the server > machine. > * For prod, the code runs on the machine to which it has been uploaded. > * Both local and remote machines are Windows based. > * I want the IDENTICAL code (if possible) to be run in both dev and prod. > > 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 is: > > data _null_; > run; > > 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 program > 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 initstmt? > > 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 batch > 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) I'd > like to submit the same code in DMS, which wants an endrsubmit at the end > 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 > on this > one :-/ > > Regards, > Scott


Back to: Top of message | Previous page | Main SAS-L page