<?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: Challenge Question in Programming 2: Creating and using custom formats in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/Challenge-Question-in-Programming-2-Creating-and-using-custom/m-p/857057#M1292</link>
    <description>&lt;P&gt;The CNTLOUT= option on the PROC FORMAT statement creates an output data set with all the variables associated with the $Typcode format. You can view this data set by adding the following:&lt;/P&gt;
&lt;P&gt;proc print data=typfmtout;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 14:50:52 GMT</pubDate>
    <dc:creator>Kathryn_SAS</dc:creator>
    <dc:date>2023-02-03T14:50:52Z</dc:date>
    <item>
      <title>Challenge Question in Programming 2: Creating and using custom formats</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Challenge-Question-in-Programming-2-Creating-and-using-custom/m-p/856910#M1290</link>
      <description>&lt;P&gt;Hi everyone, Im a bit stuck on understanding this code. Can someone advise on what is the purpose of proc format cntlout, bold below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format cntlin=pg2.np_types_regions;
run;

&lt;STRONG&gt;proc format cntlout = typfmtout;
select $TypCode;
run;&lt;/STRONG&gt;

data typfmt_update;
    set typfmtout pg2.np_newcodes;
    keep FmtName Start Label;
    FmtName='$TypCode';
run;

proc format cntlin= typfmt_update;
run;

title1 'Park Frequencies by Type';
proc freq data=pg2.np_summary;
    table Type / nocum;
    format Type $TypCode.;
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 18:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Challenge-Question-in-Programming-2-Creating-and-using-custom/m-p/856910#M1290</guid>
      <dc:creator>monsoon1</dc:creator>
      <dc:date>2023-02-02T18:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge Question in Programming 2: Creating and using custom formats</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Challenge-Question-in-Programming-2-Creating-and-using-custom/m-p/857057#M1292</link>
      <description>&lt;P&gt;The CNTLOUT= option on the PROC FORMAT statement creates an output data set with all the variables associated with the $Typcode format. You can view this data set by adding the following:&lt;/P&gt;
&lt;P&gt;proc print data=typfmtout;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 14:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Challenge-Question-in-Programming-2-Creating-and-using-custom/m-p/857057#M1292</guid>
      <dc:creator>Kathryn_SAS</dc:creator>
      <dc:date>2023-02-03T14:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge Question in Programming 2: Creating and using custom formats</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Challenge-Question-in-Programming-2-Creating-and-using-custom/m-p/857061#M1293</link>
      <description>&lt;P&gt;Probably because it is taking the scenic route?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first two steps can be reduced to one (or none if you just use WHERE= dataset option in third step).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data typfmt_update;
  set pg2.np_types_regions(where=(upcase(fmtname)='TYPCODE'))
      pg2.np_newcodes
  ;
  keep fmtname type start label;
  fmtname='TYPCODE';
  type='C';
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Basically you are adding the observations from PG2.NP_NEWCODE to the set of values used to define $TYPCODE format.&amp;nbsp; So that the next step can use PROC FORMAT to actually create the format. Which is used by the final step to change how the values or TYPE are displayed (and hence how they are grouped by PROC FREQ).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 15:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Challenge-Question-in-Programming-2-Creating-and-using-custom/m-p/857061#M1293</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-02-03T15:09:45Z</dc:date>
    </item>
  </channel>
</rss>

