BookmarkSubscribeRSS Feed
jimbarbour
Meteorite | Level 14

I'm running SAS 9.4 TS1M4 on an AIX (7100-03-03-1415) machine which I access via SAS EG 7.15 HF2 (7.100.5.6112) (64-bit).

 

I'm trying to submit some SAS code from within a SAS program using SYSTASK.

 

SYSTASK COMMAND 'sas -sysin /ca_analytics/data_intelligence/Export.sas -SYSPARM 1+5666666+a' NOWAIT STATUS=T1_RC TASKNAME=T1_TASK SHELL;
WAITFOR T1_TASK;

%PUT NOTE: RC = &T1_RC;

 

Uniformly, I get a return code of 126, and the code doesn't execute.  If I cut and paste my code onto a UNIX command line, it works just fine.  I'm surely missing something elementary, but what?

 

Any pointers appreciated.

 

Thanks,

 

Jim

2 REPLIES 2
Tom
Super User Tom
Super User

Check what machine your SAS code is running on.  In our shop commands that work on the machine that users use to launch SAS do not necessarily work on the machine that is actually running the SAS code.

jimbarbour
Meteorite | Level 14

Good suggestion.  We have only one AIX machine with SAS on it available to us, so I don't think that's the issue.

 

I also set and verify the working directory by means of an X command prior to issuing my SYSTASK as follows:

 

X "cd &SAS_Path";

FILENAME pwd PIPE "pwd";

*--------------------------------------------------------------------------------------------------*;

DATA _NULL_;
    LENGTH Working_Directory $32767;
    INFILE pwd
        TRUNCOVER
        ;
    INPUT @1 Working_Directory $32767.;
    PUTLOG "NOTE: The working directory is=" Working_Directory;
    STOP;
RUN;

 

So, I'm pretty sure I'm pointing to the right spot on the right machine.

 

Jim

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1337 views
  • 0 likes
  • 2 in conversation