<?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: Error while creating SAS format in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641908#M21839</link>
    <description>&lt;P&gt;here is the complete dataset and then the problematic code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Filiale_Ergaenzung;&lt;BR /&gt;length filhb 5 filialname $35 ;&lt;BR /&gt;input filhb filialname ;&lt;BR /&gt;datalines;&lt;BR /&gt;91100 Sonstige_ZE&lt;BR /&gt;99991 Vermittler&lt;BR /&gt;99992 Online&lt;BR /&gt;99993 Direktvertrieb&lt;BR /&gt;99994 P7S1&lt;BR /&gt;99995 DrKlein&lt;BR /&gt;99999 Nicht_zustellbar&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc sort data=Filiale_Ergaenzung nodupkey; by filialname;run;&lt;/P&gt;&lt;P&gt;data fmt;&lt;BR /&gt;set Filiale_Ergaenzung(rename=(filialname=start filhb=label)) end=last;&lt;BR /&gt;length start $35 label 5;&lt;BR /&gt;retain fmtname 'Filiale' type 'N';&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;BR /&gt;proc format cntlin=fmt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2020 12:32:56 GMT</pubDate>
    <dc:creator>PierreYvesILY</dc:creator>
    <dc:date>2020-04-22T12:32:56Z</dc:date>
    <item>
      <title>Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641887#M21836</link>
      <description>&lt;P&gt;dear SAS experts,&lt;/P&gt;&lt;P&gt;I want to create a SAS Format using a dataset.&lt;/P&gt;&lt;P&gt;I used following code:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;sort&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Filialstruktur_Ergaenzt (&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=filbez_bt_dashb filhb_bt_ec) noduplicate; &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; filbez_bt_dashb; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; fmt_filiale;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Filialstruktur_Ergaenzt(&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(filbez_bt_dashb=start filhb_bt_ec=label)) &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=last;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; fmtname &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'Filiale'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;format&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;cntlin&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=fmt_filiale; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;and I got the following error message:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;26 data fmt_filiale;&lt;BR /&gt;27 set Filialstruktur_Ergaenzt(rename=(filbez_bt_dashb=start filhb_bt_ec=label)) end=last;&lt;BR /&gt;28 retain fmtname 'Filiale';&lt;BR /&gt;29 output;&lt;BR /&gt;30 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 1072 observations read from the data set WORK.FILIALSTRUKTUR_ERGAENZT.&lt;BR /&gt;NOTE: The data set WORK.FMT_FILIALE has 1072 observations and 3 variables.&lt;BR /&gt;NOTE: Compressing data set WORK.FMT_FILIALE increased size by 12.50 percent.&lt;BR /&gt;Compressed is 9 pages; un-compressed would require 8 pages.&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;/P&gt;&lt;P&gt;31 proc format cntlin=fmt_filiale;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR: This range is repeated, or values overlap: .-..&lt;/FONT&gt;&lt;BR /&gt;31 ! run;&lt;/P&gt;&lt;P&gt;WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.&lt;BR /&gt;NOTE: PROCEDURE FORMAT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.02 seconds&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 1072 observations read from the data set WORK.FMT_FILIALE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;How can I correct this?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Thank you in advance, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Regards&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;PY&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 11:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641887#M21836</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2020-04-22T11:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641899#M21837</link>
      <description>&lt;P&gt;Inspect and correct your data, so that it fulfills the requirements for a valid format.&lt;/P&gt;
&lt;P&gt;Also do not forget to set the format type.&lt;/P&gt;
&lt;P&gt;For in-depth help, we would need to see the whole dataset.&lt;/P&gt;
&lt;P&gt;And if you want to prevent a duplicate of the &lt;EM&gt;key&lt;/EM&gt;, you have to use nodupkey in the proc sort, not noduplicate, which is an alias for noduprec.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641899#M21837</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-22T12:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641906#M21838</link>
      <description>Unless we know the data within the Filialstruktur_Ergaenzt dataset, we cannot help you. So please post the sample data so as to help you with the code.</description>
      <pubDate>Wed, 22 Apr 2020 12:29:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641906#M21838</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-04-22T12:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641908#M21839</link>
      <description>&lt;P&gt;here is the complete dataset and then the problematic code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Filiale_Ergaenzung;&lt;BR /&gt;length filhb 5 filialname $35 ;&lt;BR /&gt;input filhb filialname ;&lt;BR /&gt;datalines;&lt;BR /&gt;91100 Sonstige_ZE&lt;BR /&gt;99991 Vermittler&lt;BR /&gt;99992 Online&lt;BR /&gt;99993 Direktvertrieb&lt;BR /&gt;99994 P7S1&lt;BR /&gt;99995 DrKlein&lt;BR /&gt;99999 Nicht_zustellbar&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc sort data=Filiale_Ergaenzung nodupkey; by filialname;run;&lt;/P&gt;&lt;P&gt;data fmt;&lt;BR /&gt;set Filiale_Ergaenzung(rename=(filialname=start filhb=label)) end=last;&lt;BR /&gt;length start $35 label 5;&lt;BR /&gt;retain fmtname 'Filiale' type 'N';&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;BR /&gt;proc format cntlin=fmt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641908#M21839</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2020-04-22T12:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641911#M21840</link>
      <description>&lt;P&gt;Your code is right, but since you are using the character values as start and label as numeric, then the type should be 'C'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fmt;
set Filiale_Ergaenzung(rename=(filialname=start filhb=label)) end=last;
length start $35 label 5;
retain fmtname 'Filiale' type 'C';
output;
run;

proc format cntlin=fmt fmtlib;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641911#M21840</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-04-22T12:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641912#M21841</link>
      <description>&lt;P&gt;What should your format achieve? Map from a numeric ID to text, or from text to the numeric ID?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641912#M21841</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-22T12:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641913#M21842</link>
      <description>&lt;P&gt;Hello Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need : Filialname =&amp;gt; filhb&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641913#M21842</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2020-04-22T12:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641915#M21843</link>
      <description>&lt;P&gt;If your filhb is actually numeric, then you would need an informat (type="I"), and use the INPUT() function to convert.&lt;/P&gt;
&lt;P&gt;But since this is just a code, and not a number, I advise to store it as character in the first place, and use a character format.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641915#M21843</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-22T12:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating SAS format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641919#M21844</link>
      <description>&lt;P&gt;Since you want a format to translate from a character string, the name of the format should begin with a dollar sign.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;retain fmtname '$Filiale';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Apr 2020 13:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-while-creating-SAS-format/m-p/641919#M21844</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-04-22T13:14:08Z</dc:date>
    </item>
  </channel>
</rss>

