Problem:
When running program via SAS EG there are no errors.
However, when I use this code in Putty (Linux):
/opt/sas/sashome/SASFoundation/9.4/sas /FileStore/TU_DataMI/Testing/Edward/Quote_Warehouse/Project/Program_v3/NEW_DIM_RISK.sas -log /FileStore/ed_log.log
I receive I/O error on: 'proc sort data=stg.policy_names; by varnum; run;'
I have tested with other programs and I am receiving various errors.
Is there something I am missing, in terms of a system option I should be using?
Thanks in advance.
My first guess would be that the workspace server behind EG uses a dedicated volume for WORK, while the basic sasv9.cfg in SASFoundation/9.4 uses the default /tmp. And you run out of disk space there.
Instead of running SAS in batch like you do, use SASCONF/Lev1/SASApp/BatchServer/sasbatch.sh (or the BatchServer/sasbatch.sh in the directory of the application server context you use in EG)
Before you start experimenting, you can run this program in both environments (EG and batch):
data _null_;
path = pathname('WORK');
put path=;
run;
and look at the logs. This will give you a clue about the WORK location(s).
So it's not the location. Then we need to look for other reasons.
Run a proc options in both environments, and look for differences.
(eg you could have the compress system option set in your workspace server)
Hi,
Thanks for that. I've been comparing the proc options output.
I have compared the SAS EG output with PuTTY output and PuTTY Batch output. There are some differences, however BATCH is not working as expected either.
I think I need to be using:
/opt/sas/config/Lev1/SASApp/WorkspaceServer/WorkspaceServer.sh
...but, when running this in PuTTY, I am not receiving a log output to compare! Do you have any ideas as to why the log wouldn't be output?
The WorkspaceServer.sh is the starting script for workspace server, which always needs to send the log to the client and not to a file.
That's why I recommended to use the sasbatch.sh from the BatchServer, which is designed to be used for batch execution.
Let us see the logs of the successful and the failed execution of code.
Hmm, you don't have a problem in WORK, you have a problem in library STG, as the write to STG.POLICY_NAMES fails, and the damaged (or possibly locked by another application) file can't be read for the sort.
I understand it does look like that.
If I delete the files and re-run in SAS, runs fine.
If I delete the files and re-run in PuTTY, I/O error.
Thanks very much for your help so far Kurt - really appreciate it.
The proc options results are slightly different. As you predicted, compress = NO in Batch. There are a couple of other different ones:
NOXCMD
TERMINAL
SYNTAXCHECK
DEVICE
NOOBJECTSERVER
and some others...
The 2 I am unsure about are TERMINAL & NOOBJECTSERVER.
If compress=yes in Enterprise Guide, then that's a strong pointer. Depending on structure and contents, the compress option can reduce physical file size by 90 or more percent.
Could it be that you are running under different users, and the batch user does not have write access to STG?
Also look at free space in the directory that STG points to, and check if there's a quota set for the user running the code.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.