BookmarkSubscribeRSS Feed
JuanVte
Calcite | Level 5
Dear all,

I am conducting simulations and for some iterations I got a warning message because the model does not converge. In these cases I have to repeat the iteration because I want to reach 10000 iterations without any warning.

To do such a thing I was thinking to use the macro variable SYSWARNINGTEXT but I found that this macro is not updated until the next warning message, so I can not detect when after a model with a warning message I have a correct one.

For example:

data a;
set doesnotexist;
run;

%put &SYSWARNINGTEXT;

data b;
set _NULL_;
run;

%put &SYSWARNINGTEXT;

Any idea?

Many thanks,
Juanvte.
1 REPLY 1
JuanVte
Calcite | Level 5
I solved with the SYSERR macro variable.

SYSERR can contain the following values:

Value Description
0 Execution completed successfully and without warning messages.
1 Execution was canceled by a user with a RUN CANCEL statement.
2 Execution was canceled by a user with an ATTN or BREAK command.
3 An error in a program run in batch or non-interactive mode caused SAS to enter syntax-check mode.
4 Execution completed successfully but with warning messages.
5 Execution was canceled by a user with an ABORT CANCEL statement.
6 Execution was canceled by a user with an ABORT CANCEL FILE statement.
>6 An error occurred. The value returned is procedure-dependent.


Regards,
Juanvte

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 Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 923 views
  • 0 likes
  • 1 in conversation