Desktop productivity for business analysts and programmers

Submitting SAS Code Via SYSTASK

Reply
Frequent Contributor
Posts: 140

Submitting SAS Code Via SYSTASK

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

Super User
Super User
Posts: 8,279

Re: Submitting SAS Code Via SYSTASK

Posted in reply to jimbarbour

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.

Frequent Contributor
Posts: 140

Re: Submitting SAS Code Via SYSTASK

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

Ask a Question
Discussion stats
  • 2 replies
  • 145 views
  • 0 likes
  • 2 in conversation