BookmarkSubscribeRSS Feed
WorkingMan
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".

 

1 REPLY 1
VenuKadari
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.

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 701 views
  • 0 likes
  • 2 in conversation