<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SYSERR macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61533#M13369</link>
    <description>Thanks for your help!&lt;BR /&gt;
&lt;BR /&gt;
the problem is that SYSWARNINGTEXT  is only updated with a new warning message. If you run a process that works, in this variables is still stored the previous warning message so I can not distinguish between the proces that works and the one that doesn't work.&lt;BR /&gt;
&lt;BR /&gt;
Try this just after my syntax above:&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set _null_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;syserr &amp;amp;SYSWARNINGTEXT ;</description>
    <pubDate>Wed, 12 Jan 2011 08:18:56 GMT</pubDate>
    <dc:creator>JuanVte</dc:creator>
    <dc:date>2011-01-12T08:18:56Z</dc:date>
    <item>
      <title>SYSERR macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61531#M13367</link>
      <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
When I execute the code below, I am having the following warning message:&lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;WARNING: The relative Hessian convergence criterion of 0.2919725428 is greater than the limit&lt;BR /&gt;
         of 0.0001. The convergence is questionable.&lt;BR /&gt;
WARNING: The procedure is continuing but the validity of the model fit is questionable.&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
However, if I show the content of the variable SYSERR, it is equal to 0 instead of 4, as indicated in sas documentation:&lt;BR /&gt;
&lt;BR /&gt;
SYSERR can contain the following values: &lt;BR /&gt;
&lt;BR /&gt;
Value  Description  &lt;BR /&gt;
0  Execution completed successfully and without warning messages. &lt;BR /&gt;
1  Execution was canceled by a user with a RUN CANCEL statement. &lt;BR /&gt;
2  Execution was canceled by a user with an ATTN or BREAK command. &lt;BR /&gt;
3  An error in a program run in batch or non-interactive mode caused SAS to enter syntax-check mode. &lt;BR /&gt;
4  Execution completed successfully but with warning messages. &lt;BR /&gt;
[...] &lt;BR /&gt;
&lt;BR /&gt;
************************************************&lt;BR /&gt;
&lt;BR /&gt;
data sim_data;&lt;BR /&gt;
call streaminit(17427);&lt;BR /&gt;
do k = 1 to 200;&lt;BR /&gt;
  x = 'pl';&lt;BR /&gt;
  y = rand('NEGBINOMIAL', 0.80, 1);&lt;BR /&gt;
  output;&lt;BR /&gt;
end;&lt;BR /&gt;
do k = 1 to 200;&lt;BR /&gt;
  x = 'tx';&lt;BR /&gt;
  y = rand('NEGBINOMIAL', 0.85, 1);&lt;BR /&gt;
  output;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc genmod data=sim_data;&lt;BR /&gt;
class x (param=ref ref='pl');&lt;BR /&gt;
model y = x / dist=NEGBIN ;&lt;BR /&gt;
lsmeans x;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;syserr;&lt;BR /&gt;
&lt;BR /&gt;
Any idea??</description>
      <pubDate>Tue, 11 Jan 2011 17:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61531#M13367</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2011-01-11T17:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: SYSERR macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61532#M13368</link>
      <description>Perhaps you could use SYSWARNINGTEXT automatic variable.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
AUTOMATIC SYSWARNINGTEXT  The procedure is continuing but the validity of the model fit is questionable&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 11 Jan 2011 17:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61532#M13368</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-01-11T17:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: SYSERR macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61533#M13369</link>
      <description>Thanks for your help!&lt;BR /&gt;
&lt;BR /&gt;
the problem is that SYSWARNINGTEXT  is only updated with a new warning message. If you run a process that works, in this variables is still stored the previous warning message so I can not distinguish between the proces that works and the one that doesn't work.&lt;BR /&gt;
&lt;BR /&gt;
Try this just after my syntax above:&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set _null_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;syserr &amp;amp;SYSWARNINGTEXT ;</description>
      <pubDate>Wed, 12 Jan 2011 08:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61533#M13369</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2011-01-12T08:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: SYSERR macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61534#M13370</link>
      <description>The concergence status output has the relevant information.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
Output Added:&lt;BR /&gt;
-------------&lt;BR /&gt;
Name:       ConvergenceStatus&lt;BR /&gt;
Label:      Convergence Status&lt;BR /&gt;
Template:   Stat.Genmod.ConvergenceStatus&lt;BR /&gt;
Path:       Genmod.ConvergenceStatus&lt;BR /&gt;
-------------&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 12 Jan 2011 16:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61534#M13370</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-01-12T16:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: SYSERR macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61535#M13371</link>
      <description>Thanks!&lt;BR /&gt;
&lt;BR /&gt;
yes, at the moment I will try that. However, I would like to control over other possible warnings. I am doing a macro to calculate required sample size based on GLMz models. For that I am doing simulations where if one of them doesn't work I have to repead. In general terms, I think (because I still don't know) that in 10,000 iteration I can find more problems than the convergence one, so I would like to have a general way to repeat any iteration with a warning message.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help!!&lt;BR /&gt;
Juanvte.</description>
      <pubDate>Thu, 13 Jan 2011 09:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61535#M13371</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2011-01-13T09:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: SYSERR macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61536#M13372</link>
      <description>This works correctly at SAS 9.3 (which is about to be released -- keep sitting there).&lt;BR /&gt;
&lt;BR /&gt;
As for the problem at 9.2 - this appears to be an issue with Proc Genmod.  The SAS Macro Facility merely fetches the value for &amp;amp;syserr from the rest of the SAS System, where it's supposed to be set correctly by the data steps / procs.</description>
      <pubDate>Wed, 26 Jan 2011 15:36:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSERR-macro-variable/m-p/61536#M13372</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2011-01-26T15:36:01Z</dc:date>
    </item>
  </channel>
</rss>

