<?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: Supress error message in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61833#M13452</link>
    <description>Good point, Ksharp.  Yes, the SAS behavior differs with one- or two- question-marks specified, as documented here:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000180357.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000180357.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
input function informat question mark site:sas.com</description>
    <pubDate>Thu, 13 Jan 2011 13:07:32 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2011-01-13T13:07:32Z</dc:date>
    <item>
      <title>Supress error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61829#M13448</link>
      <description>I am reading a field that can either be a packed numeric (PD2.) or an alpha character ($2.). Since I only care if it is a number, I am reading it as PD2. format. I know I can limit the number of error messages, but is there a way to suppress the message when it encounters a character value in this field?</description>
      <pubDate>Wed, 12 Jan 2011 20:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61829#M13448</guid>
      <dc:creator>joegee</dc:creator>
      <dc:date>2011-01-12T20:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Supress error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61830#M13449</link>
      <description>hello,&lt;BR /&gt;
&lt;BR /&gt;
since you are not interested in alpha character maybe is a good idea not to read those values (and by the way values are read with INFORMATS, with FORMATS you just print the values in a suitable way):&lt;BR /&gt;
&lt;BR /&gt;
data test (drop=x);&lt;BR /&gt;
infile datalines;&lt;BR /&gt;
length x $2.;&lt;BR /&gt;
input x @;&lt;BR /&gt;
if ANYALPHA(x) then return;&lt;BR /&gt;
else input @1 a 2.;&lt;BR /&gt;
output;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1234&lt;BR /&gt;
e2&lt;BR /&gt;
56446&lt;BR /&gt;
hf&lt;BR /&gt;
fy&lt;BR /&gt;
5474&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
Marius</description>
      <pubDate>Wed, 12 Jan 2011 20:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61830#M13449</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-01-12T20:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Supress error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61831#M13450</link>
      <description>Also, with your INPUT statement (or with using the INPUT function), you can specify a "?" character ahead of the INFORMAT with some additional overhead.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 12 Jan 2011 21:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61831#M13450</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-12T21:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Supress error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61832#M13451</link>
      <description>Just as Sbb said .&lt;BR /&gt;
Do you try ' input x ?? comma8.'&lt;BR /&gt;
is double ? not single ?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 13 Jan 2011 05:23:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61832#M13451</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-01-13T05:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Supress error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61833#M13452</link>
      <description>Good point, Ksharp.  Yes, the SAS behavior differs with one- or two- question-marks specified, as documented here:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000180357.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000180357.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
input function informat question mark site:sas.com</description>
      <pubDate>Thu, 13 Jan 2011 13:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61833#M13452</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-13T13:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Supress error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61834#M13453</link>
      <description>THANKS everyone!   The ?? worked... Also good to know about the ANYALPHA function -- I can think of a couple other programs where I which I had known about that one...</description>
      <pubDate>Thu, 13 Jan 2011 15:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61834#M13453</guid>
      <dc:creator>joegee</dc:creator>
      <dc:date>2011-01-13T15:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Supress error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61835#M13454</link>
      <description>hi ... another idea ...&lt;BR /&gt;
&lt;BR /&gt;
* create a numeric INFORMAT;&lt;BR /&gt;
proc format;&lt;BR /&gt;
invalue mixed&lt;BR /&gt;
low-high = [10.]&lt;BR /&gt;
other=.&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
* use MIXED. to read "mixed data";&lt;BR /&gt;
data test;&lt;BR /&gt;
input x : mixed. @@;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1234 e2 56446 hf fy 5474 &lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
the LOG ... no errors ...&lt;BR /&gt;
&lt;BR /&gt;
90   data test;&lt;BR /&gt;
91   input x : mixed. @@;&lt;BR /&gt;
92   datalines;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;BR /&gt;
NOTE: The data set WORK.TEST has 6 observations and 1 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
the data set ...&lt;BR /&gt;
&lt;BR /&gt;
Obs      x&lt;BR /&gt;
 1      1234&lt;BR /&gt;
 2         .&lt;BR /&gt;
 3     56446&lt;BR /&gt;
 4         .&lt;BR /&gt;
 5         .&lt;BR /&gt;
 6      5474&lt;BR /&gt;
&lt;BR /&gt;
for your data, you should be able to replace [10.] in the informat with [PD2.]</description>
      <pubDate>Fri, 14 Jan 2011 03:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Supress-error-message/m-p/61835#M13454</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2011-01-14T03:05:05Z</dc:date>
    </item>
  </channel>
</rss>

