<?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: Proc Format error - format name ends in number in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-error-format-name-ends-in-number/m-p/689015#M209418</link>
    <description>&lt;P&gt;My understanding is that numeric INFORMAT names are stored internally in SAS catalogs with an ampersand on the front. Therefore the maximum length of an INFORMAT name is actually 31 not 32. Numeric FORMAT names allow the full 32 characters as they don't have a preceding ampersand. This limitation is explained clearly here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=p1pmw90bl3jzgdn1w4202kclxtho.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=p1pmw90bl3jzgdn1w4202kclxtho.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Oct 2020 21:53:48 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2020-10-05T21:53:48Z</dc:date>
    <item>
      <title>Proc Format error - format name ends in number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-error-format-name-ends-in-number/m-p/689004#M209416</link>
      <description>&lt;P&gt;Hi, I'm using SAS Studio Enterprise with SAS 9.4 and I'm getting this weird error with proc format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using a macro to create a format for each variable on my dataset, some of these variables' names end in a number, so I concat an 'f' at the end of each one and make sure none of them exceed the 32 char limit. In theory it should work, but for this variable in particular it's throwing an error when I try to load up the formats using cntlin option:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variable name:&amp;nbsp;&lt;SPAN&gt;HH_IP_AVG_VG_B_3T_SUM_LIMCO_1A6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;format name:&amp;nbsp;&lt;SPAN&gt;HH_IP_AVG_VG_B_3T_SUM_LIMCO_1A6f&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; ERROR: The format name @HH_IP_AVG_VG_B_3T_SUM_LIMCO_1A6 ends in a number, which is invalid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But if I look on the dataset under fmtname, it says&amp;nbsp;HH_IP_AVG_VG_B_3T_SUM_LIMCO_1A6f, which is correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I tried creating the format directly using proc format:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format cntlout=testformat;
  invalue hh_ip_avg_vg_b_3t_sum_limco_1a6f 100-high = 100;
run;

proc format cntlin=testformat; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;And I get the same error:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;70         proc format cntlout=testformat;
 71           invalue hh_ip_avg_vg_b_3t_sum_limco_1a6f 100-high = 100;
 NOTE: The informat name '@HH_IP_AVG_VG_B_3T_SUM_LIMCO_1A6F' exceeds 32 characters. Only the first 32 characters will be used.
 NOTE: Informat HH_IP_AVG_VG_B_3T_SUM_LIMCO_1A6 has been output.
 72         run;
 
 NOTE: PROCEDURE FORMAT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 NOTE: The data set WORK.TESTFORMAT has 1 observations and 21 variables.
 
 73         
 74         proc format cntlin=testformat;
 ERROR: The format name @HH_IP_AVG_VG_B_3T_SUM_LIMCO_1A6 ends in a number, which is invalid.
 74       !                                run;
 
 WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.
 NOTE: PROCEDURE FORMAT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: There were 1 observations read from the data set WORK.TESTFORMAT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;What is going on here? Where does the '@' come from?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 20:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-error-format-name-ends-in-number/m-p/689004#M209416</guid>
      <dc:creator>pepegalleta</dc:creator>
      <dc:date>2020-10-05T20:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Format error - format name ends in number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-error-format-name-ends-in-number/m-p/689015#M209418</link>
      <description>&lt;P&gt;My understanding is that numeric INFORMAT names are stored internally in SAS catalogs with an ampersand on the front. Therefore the maximum length of an INFORMAT name is actually 31 not 32. Numeric FORMAT names allow the full 32 characters as they don't have a preceding ampersand. This limitation is explained clearly here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=p1pmw90bl3jzgdn1w4202kclxtho.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=p1pmw90bl3jzgdn1w4202kclxtho.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 21:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-error-format-name-ends-in-number/m-p/689015#M209418</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-10-05T21:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Format error - format name ends in number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-error-format-name-ends-in-number/m-p/689023#M209423</link>
      <description>And the first NOTE tells you that's the issue you're running into...</description>
      <pubDate>Mon, 05 Oct 2020 22:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-error-format-name-ends-in-number/m-p/689023#M209423</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-05T22:25:30Z</dc:date>
    </item>
  </channel>
</rss>

