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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 892 views
  • 0 likes
  • 1 in conversation