BookmarkSubscribeRSS Feed
cosmid
Lapis Lazuli | Level 10

Hi, I have a bunch of SAS programs and I wanted to run them once in a single program. I used print1.sas, print2.sas, and print3.sas as an example. They just print out a very simple data.

 

I created a test.sh file:

 

#!/usr/bin/sh

sas print1.sas &

sas print2.sas &

sas print3.sas &

 

I used the command: ksh test.sh

 

It worked. I get a print1.log, print1.lst, print2.log, print2.lst, etc. Which is exactly what I needed. However, I keep getting the following warning message in 2 out of the 3 files:

 

WARNING: Unable to copy SASUSER registry to WORK registry. Because of this, you will not see registry customizations during this session.

 

My questions is:

1. SASUSER registry can only be used once?

2. Is this WARNING serious or its something harmless and can be ignored?

3. Is there something wrong with the test.sh file or what is the proper way of running a program like this?

 

Thanks!

 

6 REPLIES 6
Kurt_Bremser
Super User

This is a natural consequence of running SAS sessions in parallel.

Since the registry is mainly for keeping settings of the native Display Manager from one session to the next, you can safely ignore the WARNING.

Tom
Super User Tom
Super User

Just tell SAS that you don't want it to allow you to write to the SASUSER library and you will not get those notes.

 

You can add the -rsasuser option on the command line.

sas -rsasuser print1.sas &

Or include it in your personal config file.

>grep sasuser ~/sasv9.cfg 
-rsasuser
Reeza
Super User
You can ignore it but you can also create a control program with %include that will call the other programs in the order you want to run them.
SASKiwi
PROC Star

Do you need to run your programs in parallel? If the processing doesn't take long then running them one after the other is easier using the %INCLUDE statement.

cosmid
Lapis Lazuli | Level 10
Hi, I tried the %include method. It saves all the output file into one single file. For example, if I created test.sas with %include statements, instead of the test.sh, and use the test.sas, all the print*.lst will be gone and they will be saved as test.lst instead. I need the output to be named after the original SAS programs. That's why I am using the test.sh. Of course, unless there's a way getting around this? I'm new to this so I could be wrong, hehe.
SASKiwi
PROC Star

You could use PROC PRINTTO to direct SAS output to whatever file you want from within each program. If you want more fancy output, like HTML or PDF output rather than just text then controlling output with ODS is a better option. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1616 views
  • 7 likes
  • 5 in conversation