BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ricric
Calcite | Level 5

Usually I would write a shell script in LINUX to execute SAS program.

 

I used to read return code for interpreting the status (success/fail) of the program as below method

ricric_0-1669021438290.png

 

I learnt that in SAS DI, there is a  macro function rcSet(error) that can override the error code.

However, I cannot find a method to overwrite the return code when writing base SAS program.

 

Could anyone advise how to perform same behavior compared to SAS DI?

If really cannot overwrite the error code, is there any way to give out a return code for the shell script to read?

Many thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

Do I understand you correctly that you want the same behaviour as you have in SAS DI Studio, but implement it in a non-DI Studio program?

You could just copy the rcSet macro definition to your code, and use it like DI Studio generated code does?

Data never sleeps

View solution in original post

1 REPLY 1
LinusH
Tourmaline | Level 20

Do I understand you correctly that you want the same behaviour as you have in SAS DI Studio, but implement it in a non-DI Studio program?

You could just copy the rcSet macro definition to your code, and use it like DI Studio generated code does?

Data never sleeps

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 325 views
  • 0 likes
  • 2 in conversation