BookmarkSubscribeRSS Feed
Calcite | Level 5

I am using Status Handling tab in SAS DI Studio to handle different for Job with Success, Warning, and Error status.


I will then pass this status to a autocall macro script to update to a table accordingly. By right, when job success (JOB_RC = 0), it will pass in the value of success to my macro script via autocall. I did the same for warning and error. I also put 

%print Job_rc is &JOB_RC;

in the status handling to see what is the job_rc as every job_rc indicates different job status.


I tried with success run, run with warning, and error, all returned &job_rc = 0.



Now I am confused. Why is this happening? SAS DI Studio first assign job_rc =0 as standard in the job but there is no assignment again when the job ends? I am sure there must be a way for assigning the right job_rc value so that we can make use of this value under "Status Handling".


SAS Employee

Status Handling Tab allows user to place a condition and an Action.

Condition can be one of the following four: 
            Successful, Warning, Error, Send Job Status


Based on the condition, user selects an Action.

Perhaps "Send Job Status" as a condition works best in this use case.

For Action as well select "Send Job Status" . For action options, user can select which table the status should be sent to (select libref and dataset name). User may also select (optionally) a column name where user id information will be stored.

At the end of the run "job status" is sent to that table. There are other multiple options within "Status Handling" tab.

If your issue is that job_rc code is somehow incorrect, post the scenario or job to demonstrate this issue.



Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 2 in conversation