Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the system macro variable f

Status
Not open for further replies.

6656

Programmer
Nov 5, 2002
104
US
What is the system macro variable for error detection in SAS v6.12 for Windows.
E.g.: To detect whether Proc upload procedure is success or failed. Thanks.
 
The automatic macro variable is SYSERR as in following example:
Code:
%macro PROCESS;
data eric;set kenny;
killed='YES';run;
%if &syserr=4 then %let warn_rc=YES;
%else %if &syserr ^= 0 %then error_rc=YES;
proc sort data = eric;by date age;run;
%if &syserr=4 then %let warn_rc=YES;
%else %if &syserr ^= 0 %then error_rc=YES;
%mend PROCESS;
%PROCESS
data _null_;
if symget(`warn_rc')='YES' then 
put `A warning has occurred ';
else if symget(`error_rc') ='YES' then put 
`An error has occurred';
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top