<?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 proc format cntlin error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676881#M204113</link>
    <description>&lt;P&gt;I'm trying to create a format by using an imported data set from the excel file. I kept receiving the error "ERROR: For format GAAPUPR, this range is repeated, or values overlap: .-.."&amp;nbsp; when using PROC FORMAT cntlin for below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data FMTGAAPUPR;
	Retain FMTNAME 'GAAPUPR';
	set GAAPUPR (RENAME=(KEY=START) RENAME=(unearned_gaap=LABEL));

run;

proc format	cntlin=FMTGAAPUPR; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I've attached the excle file that I imported to sas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Aug 2020 20:46:43 GMT</pubDate>
    <dc:creator>lrin00</dc:creator>
    <dc:date>2020-08-14T20:46:43Z</dc:date>
    <item>
      <title>proc format cntlin error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676881#M204113</link>
      <description>&lt;P&gt;I'm trying to create a format by using an imported data set from the excel file. I kept receiving the error "ERROR: For format GAAPUPR, this range is repeated, or values overlap: .-.."&amp;nbsp; when using PROC FORMAT cntlin for below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data FMTGAAPUPR;
	Retain FMTNAME 'GAAPUPR';
	set GAAPUPR (RENAME=(KEY=START) RENAME=(unearned_gaap=LABEL));

run;

proc format	cntlin=FMTGAAPUPR; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I've attached the excle file that I imported to sas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 20:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676881#M204113</guid>
      <dc:creator>lrin00</dc:creator>
      <dc:date>2020-08-14T20:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cntlin error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676897#M204118</link>
      <description>&lt;P&gt;The reason you are getting an error is you are trying to assign a numeric format to a character variable in your case The key variable is character. Try assigning a character format. Or change the key value to numeric&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 21:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676897#M204118</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-08-14T21:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cntlin error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676904#M204121</link>
      <description>&lt;P&gt;Not going to open an XLSX from unknown source for a number of reasons. And since it is NOT your SAS data set is a bit moot to some extent. Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run&amp;nbsp; this code:&lt;/P&gt;
&lt;PRE&gt;Proc freq data=gaapupr ;
   tables key*unearned_gaap / missing list;
run;&lt;/PRE&gt;
&lt;P&gt;If Key appears with more than one value of unearned_gaap then that is the cause of your error.&lt;/P&gt;
&lt;P&gt;Using data similar to what I expect&amp;nbsp; would be the equivalent of this (incorrect) format code:&lt;/P&gt;
&lt;PRE&gt;Proc format;
value $sometext
"abc" = "value 1"
"abc" = "value 2"
;
run;&lt;/PRE&gt;
&lt;P&gt;The only time you can have the same value that has different labels assigned is when you use a multilabel format definition and that has another set of constraints.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 22:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676904#M204121</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-14T22:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc format cntlin error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676905#M204122</link>
      <description>&lt;P&gt;You probably have empty cells in your excel file.&lt;/P&gt;
&lt;P&gt;What happens if you exclude them ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format cntlin=FMTGAAPUPR(where=(not missing(start)); 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 23:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-cntlin-error/m-p/676905#M204122</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-14T23:38:28Z</dc:date>
    </item>
  </channel>
</rss>

