<?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 to create 1 million formats in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/396643#M95795</link>
    <description>&lt;P&gt;Hi Alan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply. I got the solution of this problem. I took all the labels in flat files and take into DATA STEP. We can use CNTLIN option later on for Proc format.&lt;/P&gt;</description>
    <pubDate>Sun, 17 Sep 2017 10:54:42 GMT</pubDate>
    <dc:creator>abhityagi</dc:creator>
    <dc:date>2017-09-17T10:54:42Z</dc:date>
    <item>
      <title>Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390501#M93686</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create given format for 2 million records. Please help me on this. Format is looks like given below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc format;&lt;/P&gt;&lt;P&gt;value $urban&lt;/P&gt;&lt;P&gt;'xyqa1'='1'&lt;/P&gt;&lt;P&gt;'qwas2'='2'&lt;/P&gt;&lt;P&gt;'abcd1'='3'&lt;/P&gt;&lt;P&gt;----------&lt;/P&gt;&lt;P&gt;---------&lt;/P&gt;&lt;P&gt;---------&lt;/P&gt;&lt;P&gt;other='00'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like that I have 1 million records. Please help me for that how we can create proc format for 1 million records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 06:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390501#M93686</guid>
      <dc:creator>abhityagi</dc:creator>
      <dc:date>2017-08-24T06:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390504#M93687</link>
      <description>&lt;P&gt;With that many lookup values, I'd revert to joining/merging. I doubt that you could specify such a format in proc format code, as the length of the necessary value statement will exceed the maximum length of statements that the SAS interpreter can read (32767 bytes). You might try creating a cntlin file from your data.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 06:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390504#M93687</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-08-24T06:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390505#M93688</link>
      <description>&lt;P&gt;Do you have already a file containg urban name and urban code ?&lt;/P&gt;
&lt;P&gt;If yes - you can create a "cntl" file to be used by:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp;proc format lib=any cntlin=&amp;lt;the cntl dataset created&amp;gt;; run;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
    input u_name $ u_code;
cards;
abc 1
def 2
ghi 3
; run;

data cntl;
 set sample end=eof;
       retain fmtname 'urban'  type 'C' hlo ' ';
       start = u_name; end = start;
       label = left(u_code);
       output;

      if eof then do;
         start = '**OTHER**'; end=start;
        hlo = 'O';
        output;
     end;
run;

proc format lib=work cntlin=cntl;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 06:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390505#M93688</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-08-24T06:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390508#M93690</link>
      <description>&lt;P&gt;Thanks Shumel. Yes I have containing urban name and code.&lt;/P&gt;&lt;P&gt;After that I have a field(ZIP) and with the help of this I want to drive a new fiels postal_code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;postal_code=put(ZIP,$u_name);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to assign postal_code=u_code IF Zip is matching with u_name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 06:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390508#M93690</guid>
      <dc:creator>abhityagi</dc:creator>
      <dc:date>2017-08-24T06:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390512#M93692</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;remrked, you may have memory issues and reach the limits.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will be helpful if you post an &lt;STRONG&gt;example&lt;/STRONG&gt; of your input (few/several records),&lt;/P&gt;
&lt;P&gt;with all relevant variables (urban name, code, &amp;nbsp;zip ...),&lt;/P&gt;
&lt;P&gt;and the output result you expect to achieve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then we can propose a more eficient code to get the desired results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 07:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390512#M93692</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-08-24T07:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390520#M93695</link>
      <description>&lt;P&gt;A cntlin dataset for proc format needs to have at least 4 variables:&lt;/P&gt;
&lt;P&gt;start - containing the value to be formatted/replaced&lt;/P&gt;
&lt;P&gt;label - containing the target value&lt;/P&gt;
&lt;P&gt;fmtname - the name of the format to be created&lt;/P&gt;
&lt;P&gt;type - either 'C' or 'N', denoting character or numeric format. 'C' when &lt;EM&gt;start&lt;/EM&gt; is character, 'N' when &lt;EM&gt;start&lt;/EM&gt; is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to create the cntlin dataset from your current dataset by renaming two variables to start and label and adding type and fmtname.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 07:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390520#M93695</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-08-24T07:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390532#M93700</link>
      <description>&lt;P&gt;Your problem can be solved by Hash Objects too.&lt;/P&gt;
&lt;P&gt;Yet it depends and seeing your sample datset, it can be confirmed.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 08:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390532#M93700</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2017-08-24T08:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390804#M93791</link>
      <description>&lt;P&gt;I aksed a similar question a number of years back to a senior birdie at SAS. They said above about 250K records and the value of the format drops off. Not sure how applicable it is today but little should have changed. That is what I always use as a line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agreed with other poster who said use a&amp;nbsp;hash.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 02:11:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/390804#M93791</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-08-25T02:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format to create 1 million formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/396643#M95795</link>
      <description>&lt;P&gt;Hi Alan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply. I got the solution of this problem. I took all the labels in flat files and take into DATA STEP. We can use CNTLIN option later on for Proc format.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2017 10:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-format-to-create-1-million-formats/m-p/396643#M95795</guid>
      <dc:creator>abhityagi</dc:creator>
      <dc:date>2017-09-17T10:54:42Z</dc:date>
    </item>
  </channel>
</rss>

