How to capture RC from SAS Program into K-shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to capture RC from SAS Program into K-shell
# 1  
Old 10-28-2009
How to capture RC from SAS Program into K-shell

I am running a SAS program within K-shell. This SAS program gives me return code of 3000. However, when I check return code in my K-shell, it displays RC=2.
Can someone tell me how to capture RC from SAS to K-shell?

Thanks.

Pramodini
# 2  
Old 10-28-2009
Are you sure its not an error code? What version of SAS?
# 3  
Old 10-28-2009
Yes, it is not the the return code that I expect to see in my shell. I expect to see 3000 which is a return code from SAS but shell displays return code of 2. I have SAS 9.1.3 Service pack 4.

---------- Post updated at 03:41 PM ---------- Previous update was at 11:06 AM ----------

I got it.

SAS generates the return code of 3000 (I am using syserr macro variable which contains the rc for the step, but the same value is stored in the syscc macro variable which contains the rc for the job). However, at exit time SAS translates the syscc error to something that is meaningful within the operating system.

From what I can find:

• SYSERR Code of 3000 in SAS 9.1 means "an error occurred" (this reference is for SAS 9.1 Macro Language Dictionary : SYSERR Automatic Macro Variable)
• Unix Return Code of 2 from a SAS process means "SAS issued error(s)" (this reference is for SAS 9.1 Macro Facility under UNIX : Automatic Macro Variables in UNIX Environments)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mainframe SAS JCL to Korn Shell script conversion

Hi All, Please help me to the conversion of Mainframe SAS JCL to korn Unix script. Please share the example from SAS JCL to Korn Unix Script. It be really helpful. Please share the online source also so I can look into it. Thanks, Abhishek (5 Replies)
Discussion started by: Abhishek Tyagi
5 Replies

2. Shell Programming and Scripting

Shell Script to Capture a Screenshot

Hi All, Suppose I want to take a screenshot of a website say Google and save that image. How should I do it? I tried wget with this but of no help. It just makes a particular file in jpeg format but on opening the same it says corrupted. Although I can edit the jpeg as an HTML file. wget... (15 Replies)
Discussion started by: ankur328
15 Replies

3. Shell Programming and Scripting

how to invoke external program and capture its output

Hi all, I am using an external binary to view memory starting from a specific address and i want to automate this via PERL however there are problems. Hope you can help me ..thx The output of the programme is like below: bash-3.2$ mem_disp 12B21D20 100 Opening RO Data Memory File scp.ro... (4 Replies)
Discussion started by: ekckabatop
4 Replies

4. Shell Programming and Scripting

How to capture the cause of the exception using unix shell?

Hi all, Can u pls guide me in the following requirement, Am capturing the exceptions and the cause of that exception from a log file. i cud capture the exceptions by simple grep ie., with the following command cat logfile | grep "Exceptions" But i couldn't able to capture the cause... (8 Replies)
Discussion started by: vidhyaS
8 Replies

5. Shell Programming and Scripting

How to capture C program return values in Kshell

I have a K shell script (ksh) that needs to return an email address. A C program was written (prog1) to now access the email address off of an oracle table. The call to the program in the ksh is prog1 -p parm1 Based on Parm1 the program will read an oracle table and retrieve the email... (2 Replies)
Discussion started by: jclanc8
2 Replies

6. Shell Programming and Scripting

Capture unexpected exit in shell script

Hi, I have shell script that checks processes forever. But somehow it is killed and I want to know what causes it. while do check the processes if they are running, if not restart them done I want to capture the output when the script is terminated, how can I do that? /Andreas (2 Replies)
Discussion started by: mr_andrew
2 Replies

7. Shell Programming and Scripting

How to capture return value from java in shell scripting

Hi All, My shell script will call a java component with some arguments , the java component returns a string value to the shell script. How to assign the return value to the shell variable. Here is the sample code. In my shell script i am calling the java as fallows. --exporting... (1 Reply)
Discussion started by: rajeshorpu
1 Replies

8. Programming

capture key board events using C program

hi This is mahesh please can any one post source of 'c'. to capture key board events. thank u (1 Reply)
Discussion started by: smahesh2007
1 Replies

9. Shell Programming and Scripting

Capture Shell Script Output To A File

Hi, I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window $./dbProcess.sh stop #### Run Details ###### Hostname : server-hop-1... (4 Replies)
Discussion started by: rajan_san
4 Replies

10. Shell Programming and Scripting

Capture output of program to file with limited filesize

I'm working on a script that will perform a backup, save a log of said backup and send the output to me in an email. Everything is working fine so far except that I can't figure out how to specify a maximum file size for the log file. I don't want a runaway log file jamming up the server.... (7 Replies)
Discussion started by: spectre_240sx
7 Replies
Login or Register to Ask a Question