<?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: How to use PROC FORMAT CNTLIN= to load Numeric and Character formats from dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580160#M164775</link>
    <description>Type explicitly tells SAS if you're creating a numeric or character format.</description>
    <pubDate>Fri, 09 Aug 2019 14:59:12 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-08-09T14:59:12Z</dc:date>
    <item>
      <title>How to use PROC FORMAT CNTLIN= to load Numeric and Character formats from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580095#M164751</link>
      <description>&lt;P&gt;I have created a SAS dataset that has the formats that I want to load.&lt;/P&gt;
&lt;P&gt;Some formats have range and some of them have just labels.&lt;/P&gt;
&lt;P&gt;The range and just label formats don't load together. How can I create one dataset that has all the formats (range,label,numeric,character,date) and I load them at once.&lt;/P&gt;
&lt;P&gt;Please send me a link to any examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example&lt;/P&gt;
&lt;P&gt;fmtname,start,end,label,hlo&lt;/P&gt;
&lt;P&gt;score,-999,400,Score 1,L&lt;/P&gt;
&lt;P&gt;score,401,800,Score 2,&lt;/P&gt;
&lt;P&gt;score,801,9999,Score 3,H&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;product,1,,Product 1,&lt;/P&gt;
&lt;P&gt;product,2,,Product 2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=myformats&lt;BR /&gt;&amp;nbsp;&amp;nbsp; by fmtname start;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;PROC FORMAT CNTLIN=myformats;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 10:13:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580095#M164751</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2019-08-09T10:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use PROC FORMAT CNTLIN= to load Numeric and Character formats from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580097#M164752</link>
      <description>&lt;P&gt;I dont think it is possible to create the numeric format and character format from the same dataset using proc format CNTLIN option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to create separate datasets for numeric format and character format then use separate proc format CNTLIN option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
type='N'; 
fmtname='range';
hlo='L';
start=.;
end=10000;
label='&amp;lt;= 100,000';
output;
type='N'; 
fmtname='range';
hlo=' ';
start=100001;
end=250000;
label='&amp;gt; 100,000';
output;
type='N'; 
fmtname='range';
hlo=' ';
start=250001;
end=400000;
label='&amp;gt; 250,000';
output;
type='N'; 
fmtname='range';
hlo=' ';
start=400001;
end=500000;
label='&amp;gt; 400,000';
output;
type='N'; 
fmtname='range';
start=500001;
end=.;
hlo='H';
label='&amp;gt; 500,000';
output;
run;

data have2;
/*character format*/
type='C'; 
fmtname='$sexsg';
start='F';
label='Female';
output;
type='C'; 
fmtname='$sexsg';
start='M';
label='Male';
output;
run;


proc format cntlin=have fmtlib;
run;

proc format cntlin=have2 fmtlib;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Aug 2019 10:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580097#M164752</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-08-09T10:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use PROC FORMAT CNTLIN= to load Numeric and Character formats from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580098#M164753</link>
      <description>&lt;P&gt;Thanks Jag&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 10:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580098#M164753</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2019-08-09T10:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use PROC FORMAT CNTLIN= to load Numeric and Character formats from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580100#M164754</link>
      <description>&lt;P&gt;The value "product" is not a valid name for a char-format, if you don't use the type variable.&lt;/P&gt;
&lt;P&gt;Can you please post the datasets "myformats" using datalines, so that we have the same starting point.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 10:51:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580100#M164754</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-08-09T10:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use PROC FORMAT CNTLIN= to load Numeric and Character formats from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580102#M164755</link>
      <description>&lt;P&gt;Hi Andrea, my apologies. I was only trying to describe as an example and is not the actual data. The example that jag has provided above is exactly what I need in addition to another format that would be numeric with labels and not range.&lt;/P&gt;
&lt;P&gt;Also, how does 'type' column help proc statement &lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;FORMAT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CNTLIN&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 11:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580102#M164755</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2019-08-09T11:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use PROC FORMAT CNTLIN= to load Numeric and Character formats from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580160#M164775</link>
      <description>Type explicitly tells SAS if you're creating a numeric or character format.</description>
      <pubDate>Fri, 09 Aug 2019 14:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-PROC-FORMAT-CNTLIN-to-load-Numeric-and-Character/m-p/580160#M164775</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-09T14:59:12Z</dc:date>
    </item>
  </channel>
</rss>

