BookmarkSubscribeRSS Feed
HM3
Calcite | Level 5 HM3
Calcite | Level 5
I want to create a batch file in windows which will run
1.open SAS.
2.Run a fixed script(options like nocentre nodate) before I start my work.
3.Clean log,ouput and editor.
Pl help.
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
The SAS.COM support website http://support.sas.com/ has technical documentation and supplemental conference/technical material available on this topic. Suggest you use the website SEARCH facility using your key words.

Scott Barry
SBBWorks, Inc.
Doc_Duke
Rhodochrosite | Level 12
Actually, I'm not sure that Windows supports what I think you want to do in the batch environment. It sounds like you want to do some pre-processing, open an INTERACTIVE session, and then do some post processing. I don't think that you can launch an interactive SAS session from a batch file in Windows.

If I've misinterpreted and you just want to run a batch job and send all the log and output text to the bit bucket, then the options for that SAS command are in the SAS companion for Windows.

Doc Muhlbaier
Duke
Cynthia_sas
SAS Super FREQ
Hi:
I'm not sure why you would want a batch file to open SAS. On your windows desktop, SAS.EXE is the program that starts SAS. You might investigate the use of the CONFIG and AUTOEXEC files, which are two ways to initialize a SAS session to your liking (as with options, settings, work locations, library locations, etc).

What do you mean be a "fixed script" -- SAS doesn't really have "scripts" -- it has programs. You can choose to open SAS and only issue options and Display Manager and FILENAME or LIBNAME statements or you can choose to open SAS and run an entire program.

When SAS starts, you would only need to clear the log and output windows if you had RUN something. When SAS first starts up, the only information that is displayed is in the SAS log --with your site number and SAS version number -- which you might need for calling Tech Support (for example). When you first start up SAS, if no AUTOEXEC.SAS program is invoked, only the LOG window would need to be cleared. The OUTPUT window and the EDITOR window should both be "blank".

Before you go down the road of investigating a batch file to start SAS, you should reference the SAS Companion for Windows to determine how you can use SAS methods to configure and set up an interactive session.

If you want to run an existing program in batch or non-interactive mode, you can do that too. The SAS Companion for Windows will also have that information.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1392 views
  • 0 likes
  • 4 in conversation