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!
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.
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
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.
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.