SAS Component Language Dictionary |
Category: | Message |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
rc=SYSRC(<display-stat>); |
contains the return code for the most recent error or warning condition, if display-stat is omitted. Otherwise, returns the exit status of CALL DISPLAY:
0 | |
-1 |
causes the SYSRC function to return the most recent exit status of CALL DISPLAY. The value of the argument does not matter, only whether any value is specified.
Details |
If you pass an argument to SYSRC, the function returns the exit status of the most recently called execution of CALL DISPLAY rather than the SAS system return code for the most recent error or warning condition. Thus, you can use SYSRC to determine how a user terminated an entry that was called with CALL DISPLAY.
To return the SAS system return code, do not specify any value for display-stat. See SAS System Return Codes for more information about how to use return code values.
Example |
Determine how a user exited from another entry that was called within the current application:
call display('test.scl'); if sysrc(1)=-1 then _msg_= 'User exited TEST.SCL with a CANCEL command'; else _msg_= 'User exited TEST.SCL with an END command';
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.