<?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: Make Format from DataSet in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/901182#M83072</link>
    <description>&lt;P&gt;Hi Peter,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greetings!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also had the similar question as how to create a format from a dataset. I found following two sources useful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) SAS Documentation:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.1/proc/n1e19y6lrektafn1kj6nbvhus59w.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/vdmmlcdc/8.1/proc/n1e19y6lrektafn1kj6nbvhus59w.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;2) A paper with title "Creating a Format from Raw Data or a SAS® Dataset " by&amp;nbsp;Wendi L. Wright :&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/068-2007.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/068-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The paper is of 2007 and in documentation, a table named 'The CTLR Dataset' gives lot of information. However, if there is any better way of understanding it, please let me know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanking you,&lt;/P&gt;
&lt;P&gt;Yours sincerely,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2023 05:31:34 GMT</pubDate>
    <dc:creator>DrAbhijeetSafai</dc:creator>
    <dc:date>2023-11-02T05:31:34Z</dc:date>
    <item>
      <title>Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67408#M19272</link>
      <description>Hi All&lt;BR /&gt;
I am brand new to this SAS thing. I have a question about making Formats. I have tried make a Format from a explaining, but in this Format I also like to have a "Other=" entry to mark all values outside the defined range, but I do not know how to do. This is the code; but all values go to "???" and not just the number 3 as I expected.&lt;BR /&gt;
&lt;BR /&gt;
 data t1;                          &lt;BR /&gt;
      input key name $;            &lt;BR /&gt;
 cards;                            &lt;BR /&gt;
 1 A                               &lt;BR /&gt;
 2 B                               &lt;BR /&gt;
 ; run;                            &lt;BR /&gt;
                                   &lt;BR /&gt;
 data t2 (drop=key name);          &lt;BR /&gt;
      set t1;                      &lt;BR /&gt;
      fmtname='fmt';               &lt;BR /&gt;
      start=key;                   &lt;BR /&gt;
      label=name;                  &lt;BR /&gt;
 run;                              &lt;BR /&gt;
                                   &lt;BR /&gt;
 proc format cntlin=t2;            &lt;BR /&gt;
      value fmt other='???';       &lt;BR /&gt;
 run;                              &lt;BR /&gt;
                                   &lt;BR /&gt;
 data y;                           &lt;BR /&gt;
      a=3; b=2; c=1;               &lt;BR /&gt;
      put a a fmt.;                &lt;BR /&gt;
      put b b fmt.;                &lt;BR /&gt;
      put c c fmt.;                &lt;BR /&gt;
 run;                              &lt;BR /&gt;
                                   &lt;BR /&gt;
any help? or are there another post desribing how to do?&lt;BR /&gt;
&lt;BR /&gt;
Peter Schwennesen</description>
      <pubDate>Thu, 19 May 2011 14:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67408#M19272</guid>
      <dc:creator>PeterSchwennesen</dc:creator>
      <dc:date>2011-05-19T14:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67409#M19273</link>
      <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
A fast way to get the code right is to use SAS Enterprise Guide (4.3 - not sure about earlier versions).&lt;BR /&gt;
&lt;BR /&gt;
There you find under "Tasks/Data/Create Format from Dataset..." a wizard which creates you the code.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Thu, 19 May 2011 14:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67409#M19273</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-05-19T14:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67410#M19274</link>
      <description>[pre]&lt;BR /&gt;
data t1; &lt;BR /&gt;
   input key name $; &lt;BR /&gt;
   cards; &lt;BR /&gt;
1 A &lt;BR /&gt;
2 B &lt;BR /&gt;
; run; &lt;BR /&gt;
&lt;BR /&gt;
data t2; &lt;BR /&gt;
   retain fmtname 'fmt' type 'n' hlo '   ';&lt;BR /&gt;
   length label $64;&lt;BR /&gt;
   set t1(rename=(key=start name=label)) end=eof;&lt;BR /&gt;
   output;&lt;BR /&gt;
   if eof then do;&lt;BR /&gt;
      call missing(start);&lt;BR /&gt;
      label = 'Outside Range';&lt;BR /&gt;
      hlo = 'O';&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run; &lt;BR /&gt;
proc format cntlin=t2 cntlout=cntlout;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print data=cntlout;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 19 May 2011 15:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67410#M19274</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-05-19T15:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67411#M19275</link>
      <description>Hi Data_NULL_&lt;BR /&gt;
Thanks. Now it is Working.&lt;BR /&gt;
However it is a little cryptic code for me, &lt;BR /&gt;
I am not Quite sure what the function of "call missing(Start); hlo='O' is.&lt;BR /&gt;
but thanks, &lt;BR /&gt;
Peter Schwennesen</description>
      <pubDate>Mon, 23 May 2011 07:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67411#M19275</guid>
      <dc:creator>PeterSchwennesen</dc:creator>
      <dc:date>2011-05-23T07:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67412#M19276</link>
      <description>Peter,&lt;BR /&gt;
&lt;BR /&gt;
DataNull was simply putting in the conditions to include an extra format record in case any of your values fall outside of the defined formats.&lt;BR /&gt;
&lt;BR /&gt;
You'll notice that both of those statements are only run after all of the records have been read (i.e., at the end of the file).&lt;BR /&gt;
&lt;BR /&gt;
call missing(Start) simply set the value of start to missing and hlo='O' sets the value of hlo to 'O' or 'other'&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Art&lt;BR /&gt;
---------&lt;BR /&gt;
&amp;gt; Hi Data_NULL_&lt;BR /&gt;
&amp;gt; Thanks. Now it is Working.&lt;BR /&gt;
&amp;gt; However it is a little cryptic code for me, &lt;BR /&gt;
&amp;gt; I am not Quite sure what the function of "call&lt;BR /&gt;
&amp;gt; missing(Start); hlo='O' is.&lt;BR /&gt;
&amp;gt; but thanks, &lt;BR /&gt;
&amp;gt; Peter Schwennesen</description>
      <pubDate>Mon, 23 May 2011 16:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67412#M19276</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-05-23T16:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67413#M19277</link>
      <description>Hi Art&lt;BR /&gt;
I still do not quite understand, but I hope it will com. &lt;BR /&gt;
I get the overall meaning.&lt;BR /&gt;
But thanks&lt;BR /&gt;
Peter Schwennesen</description>
      <pubDate>Tue, 24 May 2011 07:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67413#M19277</guid>
      <dc:creator>PeterSchwennesen</dc:creator>
      <dc:date>2011-05-24T07:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67414#M19278</link>
      <description>Peter,&lt;BR /&gt;
&lt;BR /&gt;
A nice (I think) explanation of the process can be found at:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi26/p236-26.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi26/p236-26.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Art&lt;BR /&gt;
&amp;gt; Hi Art&lt;BR /&gt;
&amp;gt; I still do not quite understand, but I hope it will&lt;BR /&gt;
&amp;gt; com. &lt;BR /&gt;
&amp;gt; I get the overall meaning.&lt;BR /&gt;
&amp;gt; But thanks&lt;BR /&gt;
&amp;gt; Peter Schwennesen</description>
      <pubDate>Tue, 24 May 2011 13:07:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/67414#M19278</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-05-24T13:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make Format from DataSet</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/901182#M83072</link>
      <description>&lt;P&gt;Hi Peter,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greetings!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also had the similar question as how to create a format from a dataset. I found following two sources useful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) SAS Documentation:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.1/proc/n1e19y6lrektafn1kj6nbvhus59w.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/vdmmlcdc/8.1/proc/n1e19y6lrektafn1kj6nbvhus59w.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;2) A paper with title "Creating a Format from Raw Data or a SAS® Dataset " by&amp;nbsp;Wendi L. Wright :&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/068-2007.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/forum2007/068-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The paper is of 2007 and in documentation, a table named 'The CTLR Dataset' gives lot of information. However, if there is any better way of understanding it, please let me know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanking you,&lt;/P&gt;
&lt;P&gt;Yours sincerely,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 05:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Make-Format-from-DataSet/m-p/901182#M83072</guid>
      <dc:creator>DrAbhijeetSafai</dc:creator>
      <dc:date>2023-11-02T05:31:34Z</dc:date>
    </item>
  </channel>
</rss>

