<?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: what happens when format is different from informat in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69488#M19965</link>
    <description>Though not mentioned by the OP, a declared LENGTH attribute (ATTRIB or LENGTH statement) "may" affect the SAS NUMERIC variable resolution in a subsequent DATA/PROC step, if the SAS variable is kept.  &lt;BR /&gt;
&lt;BR /&gt;
However, most definitely if an INFORMAT is used on an INPUT statement, there also may be incorrect data interpretation.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
33   data x;&lt;BR /&gt;
34   length a 4;&lt;BR /&gt;
35   format a 14.4;&lt;BR /&gt;
36   input a ;&lt;BR /&gt;
37   putlog _all_;&lt;BR /&gt;
38   cards;&lt;BR /&gt;
&lt;BR /&gt;
a=22212.2222 _ERROR_=0 _N_=1&lt;BR /&gt;
NOTE: The data set WORK.X has 1 observations and 1 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.01 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
40   run;&lt;BR /&gt;
41   data _null_;&lt;BR /&gt;
42   set ;&lt;BR /&gt;
43   putlog _all_;&lt;BR /&gt;
44   run;&lt;BR /&gt;
&lt;BR /&gt;
a=22212.2188 _ERROR_=0 _N_=1&lt;BR /&gt;
NOTE: There were 1 observations read from the data set WORK.X.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.03 seconds&lt;BR /&gt;
      cpu time            0.00 seconds

Message was edited by: sbb</description>
    <pubDate>Fri, 19 Mar 2010 12:03:31 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-03-19T12:03:31Z</dc:date>
    <item>
      <title>what happens when format is different from informat</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69485#M19962</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have a new patient dataset where patient num(numeric field) is in format 11 and informat 11&lt;BR /&gt;
but recently the team who provides the patient dataset created new patient dataset and the patient num is in format 2O AND informat 20.&lt;BR /&gt;
 &lt;BR /&gt;
but when i create another version of  new patient dataset i want to use patient num in format 11 and informat 11.&lt;BR /&gt;
i use sql to create another version of new patient dataset,and i use like this&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table newver as select patnum  format 11. from newpat ;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
My question is what if i do not change the informat here?&lt;BR /&gt;
Can any one help?</description>
      <pubDate>Fri, 19 Mar 2010 01:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69485#M19962</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2010-03-19T01:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: what happens when format is different from informat</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69486#M19963</link>
      <description>The associated INFORMAT is only used when no INFORMAT is named on an INPUT statement.  You will need to review the SAS program that loads your input data for a specified or implied INFORMAT definition.  DOC link provided below for INFORMAT statement:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000178244.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000178244.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 19 Mar 2010 01:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69486#M19963</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-19T01:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: what happens when format is different from informat</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69487#M19964</link>
      <description>The format and informat is not a problem.  What I would worry about given your statement is the length of the variable.  Make sure you are not truncating the new data to fit it into 11.</description>
      <pubDate>Fri, 19 Mar 2010 11:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69487#M19964</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2010-03-19T11:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: what happens when format is different from informat</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69488#M19965</link>
      <description>Though not mentioned by the OP, a declared LENGTH attribute (ATTRIB or LENGTH statement) "may" affect the SAS NUMERIC variable resolution in a subsequent DATA/PROC step, if the SAS variable is kept.  &lt;BR /&gt;
&lt;BR /&gt;
However, most definitely if an INFORMAT is used on an INPUT statement, there also may be incorrect data interpretation.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
33   data x;&lt;BR /&gt;
34   length a 4;&lt;BR /&gt;
35   format a 14.4;&lt;BR /&gt;
36   input a ;&lt;BR /&gt;
37   putlog _all_;&lt;BR /&gt;
38   cards;&lt;BR /&gt;
&lt;BR /&gt;
a=22212.2222 _ERROR_=0 _N_=1&lt;BR /&gt;
NOTE: The data set WORK.X has 1 observations and 1 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.01 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
40   run;&lt;BR /&gt;
41   data _null_;&lt;BR /&gt;
42   set ;&lt;BR /&gt;
43   putlog _all_;&lt;BR /&gt;
44   run;&lt;BR /&gt;
&lt;BR /&gt;
a=22212.2188 _ERROR_=0 _N_=1&lt;BR /&gt;
NOTE: There were 1 observations read from the data set WORK.X.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.03 seconds&lt;BR /&gt;
      cpu time            0.00 seconds

Message was edited by: sbb</description>
      <pubDate>Fri, 19 Mar 2010 12:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/what-happens-when-format-is-different-from-informat/m-p/69488#M19965</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-19T12:03:31Z</dc:date>
    </item>
  </channel>
</rss>

