<?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 CNTLIN FORMATS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104367#M29162</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have difficulty in figuring when to and when not use things a sshowm below&lt;/P&gt;&lt;P&gt;Please help me figure this out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=diag(keep=id) out=encount nodupkey;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DATA fmtDataset;&lt;BR /&gt;set encount (rename=(id=start));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; /*id is a numeric var*/&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; label="yes";&lt;BR /&gt;&amp;nbsp; fmtname="&lt;STRONG&gt;ENCID&lt;/STRONG&gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; /*How will I know if i have to enclose the fmt name in Quotes or No Quotes or to put a dollar sign leading the fmt name?????*/&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; run;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;PROC FORMAT CNTLIN=fmtDataset;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set clrt.order_med;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if put(ID, &lt;STRONG&gt;ENCID.)&lt;/STRONG&gt; = 'yes';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; /*How will I know if i have to put $ sign leading the format name or not..if i put in this case it says it has already been defined NUMERIC?????*/&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Apr 2013 17:23:37 GMT</pubDate>
    <dc:creator>robertrao</dc:creator>
    <dc:date>2013-04-10T17:23:37Z</dc:date>
    <item>
      <title>CNTLIN FORMATS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104367#M29162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have difficulty in figuring when to and when not use things a sshowm below&lt;/P&gt;&lt;P&gt;Please help me figure this out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=diag(keep=id) out=encount nodupkey;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DATA fmtDataset;&lt;BR /&gt;set encount (rename=(id=start));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; /*id is a numeric var*/&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; label="yes";&lt;BR /&gt;&amp;nbsp; fmtname="&lt;STRONG&gt;ENCID&lt;/STRONG&gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; /*How will I know if i have to enclose the fmt name in Quotes or No Quotes or to put a dollar sign leading the fmt name?????*/&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; run;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;PROC FORMAT CNTLIN=fmtDataset;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set clrt.order_med;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if put(ID, &lt;STRONG&gt;ENCID.)&lt;/STRONG&gt; = 'yes';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; /*How will I know if i have to put $ sign leading the format name or not..if i put in this case it says it has already been defined NUMERIC?????*/&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 17:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104367#M29162</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-10T17:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: CNTLIN FORMATS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104368#M29163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the first DATA step, the fmtname is a text string and must be in quotes.&amp;nbsp; The "$" is used if the variable to which the format will be applied later is a character data type.&amp;nbsp; See the documentation for PROC FORMAT for the data types of the CNTLIN data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second DATA step, ENCID. is the name of the format to be applied to ID; it is not in quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 19:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104368#M29163</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2013-04-10T19:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: CNTLIN FORMATS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104369#M29164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a good proc format reference:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi30/001-30.pdf" title="http://www2.sas.com/proceedings/sugi30/001-30.pdf"&gt;http://www2.sas.com/proceedings/sugi30/001-30.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 19:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104369#M29164</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-04-10T19:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: CNTLIN FORMATS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104370#M29165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can tell PROC FORMAT what type of format/informat you want to create by adding the TYPE variable to your CNTLIN dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If ID variable is Numeric:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;fmtname="&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ENCID&lt;/STRONG&gt;";&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;type='N';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;...&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;if put( ID, &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ENCID.)&lt;/STRONG&gt; = 'yes';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If ID variable is character:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;fmtname="&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ENCID&lt;/STRONG&gt;";&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;type='C';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;...&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;if put( ID, $&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ENCID.)&lt;/STRONG&gt; = 'yes';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;An easy way to test is to make a format and use CNTLOUT option to create a dataset and look at how SAS does it.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 13:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CNTLIN-FORMATS/m-p/104370#M29165</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-11T13:26:56Z</dc:date>
    </item>
  </channel>
</rss>

