sas >> batch vs interactive mode

by Philip Primak » Sun, 07 Aug 2005 06:34:47 GMT

Hi

What would be the simplest way to check if program is running in batch
or interactive mode? (global macro variable or some option?)

Thank you
Philip Primak
Genzyme Corp.



sas >> batch vs interactive mode

by sashole » Sun, 07 Aug 2005 06:57:37 GMT


%put &sysenv ; *FORE=interactive, BACK=batch;




sas >> batch vs interactive mode

by Philip Primak » Sun, 07 Aug 2005 10:57:38 GMT

In Windows the value of auto macro variable SYSENV is constant and
always equal to FORE. It may work under different OS but not in Windows.



batch vs interactive mode

by art297 » Sun, 07 Aug 2005 11:57:59 GMT

Philip,

Try: %put &SYSPROCESSNAME.;

When run in interactive mode it produces 'DMS Process'.

However, when run in batch mode, it produces the full path and file name
of the program that was run.

Art
-----------




batch vs interactive mode

by Scott Bass » Sun, 07 Aug 2005 12:57:37 GMT





Add the command line option -noterminal to the script or command line that
invokes your Windows program in batch. Whether or not SAS should set the
value of SYSENV automatically based on batch vs. interactive execution,
that's the way it works under Windows for now. If you add this option to
your command line, SYSENV will be set to BACK during batch execution.

HTH,
Scott




batch vs interactive mode

by davidlcassell » Mon, 08 Aug 2005 04:00:47 GMT

Scott replied to Phil:

In Win32, the typical app is still running as a 'foreground' process, even
if
we fire it off without using the Display Manager. It is still attached to a
terminal
process, and it still has other 'foreground' features. Using the
-noterminal
option severs that connection and makes the batch process an actual
background process. So that should make the difference in the value of
&SYSENV .

If you don't have any control over the command line options, then you
might prefer to use the &SYSPROCESSNAME variable and just check that
it doesn't start with "DMS".

HTH,
David
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


batch vs interactive mode

by Arjen Raateland » Thu, 18 Aug 2005 17:05:29 GMT






The funny thing is that even when using -noterminal, SAS will still
display its splash screen (if the -splash option is set) and show the
little grey informational window with the name of the PROGRAM, the LIST
and the LOG file.
--
Mr. Arjen Raateland
Finnish Environment Institute SYKE
Research Dept.
SAS Support
phone +358 9 4030 0350


batch vs interactive mode

by davidlcassell » Fri, 19 Aug 2005 07:13:32 GMT

XXXX@XXXXX.COM replied:

Actually, that's what I would anticipate.

Remember, we've watched that stupid splash screen pop up in a
separate window for unpteen thousand times over the years. It's
a separate terminal process, which is why you have to use the
-nosplash option to keep SAS from spawning the thing while it's
working on building the DM window behind your back.

HTH,
David
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Similar Threads

1. Processing speed: batch vs. interactive

2. batch Vs interactive

i am trying to export sas dataset as  txt file.
   It works fine when i run it in interactive mode.
but when i try to run the same program in batch mode it outputs the
character value with double quotation marks  around it.
 does anybody know how to get rid of this quotation mark.
Thanks in advance

3. strange difference in behavior batch vs interactive

4. batch vs. interactive SAS -- generic critical errors

Two SAS programs that have been running without errors for months have
been choking recently with "generic critical error" messages. I
discovered that when I run these programs interactively in SAS
everything works fine, but when I run these same programs in batch
mode (e.g., when the Task Scheduler initiates SAS to run the code),
there is a failure with a generic critical error. Furthermore, if I
start a SAS session and keep it active as a window (but without
running anything in it), and then run my code in batch mode,
everything works fine, but if there is no active SAS session in the
background, the program fails to run in batch.

Has anyone run into this issue, or have suggestions for fixing it so
that I don't have to keep a SAS session running in the background?

5. SAS Log and Interactive mode

6. Killa Job In interactive Mode

How would one go about killing a job submitted to a AIX Box (other than
completely shutting down the session and logging back on) when the
interface is PC SAS?

Thanks,
Toby Dunn

7. FW: Killa Job In interactive Mode

8. 'batch' start to interactive SAS Session?

Hi folks,

Is it possible to start an interactive session such that it runs a
specified SAS program at startup (like batch mode) but then reverts to an
interactive session (rather than closes) once that task has been completed?
(Windows platform).

I realise that I could run a batch session, let it terminate and then open
an interactive session, but it would suit my purpose better if I could do
as described above.

TIA.

Kind Regards,

John

----------------------------------------------------------------
Dr John Whittington,       Voice:    +44 (0) 1296 730225
Mediscience Services       Fax:      +44 (0) 1296 738893
Twyford Manor, Twyford,    E-mail:    XXXX@XXXXX.COM 
Buckingham  MK18 4EL, UK
----------------------------------------------------------------