04-25-2018 06:45 AM
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.
04-25-2018 08:04 AM
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)
04-25-2018 08:11 AM
04-25-2018 08:25 AM
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).
04-25-2018 08:32 AM
04-25-2018 08:49 AM
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)
04-25-2018 10:05 AM
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:
...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?
04-25-2018 10:19 AM
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.
04-25-2018 10:37 AM
04-25-2018 10:50 AM
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.
04-25-2018 11:02 AM - edited 04-25-2018 11:23 AM
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:
and some others...
The 2 I am unsure about are TERMINAL & NOOBJECTSERVER.
04-25-2018 12:20 PM
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.
04-25-2018 11:30 PM
Could it be that you are running under different users, and the batch user does not have write access to STG?
04-26-2018 04:18 AM
04-26-2018 04:44 AM
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.