<?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 tabulate + preloadfmt: how to remove the warning in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828648#M327342</link>
    <description>&lt;P&gt;I've just realised that I can at least ignore the format from the SAS system using dictionaries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   select fmtname
   from dictionary.formats
   where fmttype='F' and source in ('B','U');
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have any other alternative, feel free to share.&lt;/P&gt;
&lt;P&gt;For the time being this solution should be sufficient for me.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 06:59:45 GMT</pubDate>
    <dc:creator>xxformat_com</dc:creator>
    <dc:date>2022-08-15T06:59:45Z</dc:date>
    <item>
      <title>proc tabulate + preloadfmt: how to remove the warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828628#M327334</link>
      <description>&lt;P&gt;I'm generating code like this for all variables of all the datasets of a given library.&lt;/P&gt;
&lt;P&gt;I cannot know beforehand waht format will be used, if any.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output Tabulate.Report.Table=SHOES_FREQ;

proc tabulate data=sashelp.SHOES;
    class Sales / preloadfmt missing;
    table Sales / printmiss;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My original idea was to look at the format variable in the metadata &lt;BR /&gt;to decide if the preloadfmt was to be used in proc tabulate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   select name, format
   from dictionary.columns
   where upcase(libname)='SASHELP' and
         upcase(memname)='SHOES';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But logically, it won't work for generic formats provided by the SAS system. It is fine for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Option 1 would be to find a way to identify if the format is relevant or not beforehand. Any idea how?&lt;BR /&gt;Option 2 would be to set a global option to nowarn to avoid the warning in that case. Does such solution exists?&lt;/P&gt;
&lt;P&gt;Option 3?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2022 21:28:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828628#M327334</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-08-14T21:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate + preloadfmt: how to remove the warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828640#M327337</link>
      <description>&lt;P&gt;If you are using a generic SAS format, why do you need the PRELOADFMT option?&amp;nbsp; I believe the two most common purposes (? the only purposes?) of that option is to either (1) force a re-ordering of the CLASS variables according to a user-specific format, as opposed to ordering by underlying value, or (2) accommodate a multilabel format.&amp;nbsp; But if you are happy with a generic SAS format, you are probably not interested in re-ordering or multi-labelling, so why use PRELOADFMT at all?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now if you had naming conventions for user specified formats that do one of the above (say a double leading __), you could run your proc sql to identify any CLASS variables having such formats do have the PRELOADFMT option applied.&amp;nbsp; I suspect that would be the only situation in which you would need PRELOADFMT.&amp;nbsp; &amp;nbsp;I.e., make PRELOADFMT the exception, not the default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 01:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828640#M327337</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-08-15T01:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate + preloadfmt: how to remove the warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828647#M327341</link>
      <description>&lt;P&gt;I'm building a generic tool. Therefore I do not know in advance what will be the variables with formats and what kind of format will be used. So it is a format like $dollar12 as in the example I will exclude the option. But if it is a format like sex M=Male/F=Female I want to use preloadfmt.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 06:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828647#M327341</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-08-15T06:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate + preloadfmt: how to remove the warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828648#M327342</link>
      <description>&lt;P&gt;I've just realised that I can at least ignore the format from the SAS system using dictionaries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   select fmtname
   from dictionary.formats
   where fmttype='F' and source in ('B','U');
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have any other alternative, feel free to share.&lt;/P&gt;
&lt;P&gt;For the time being this solution should be sufficient for me.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 06:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828648#M327342</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-08-15T06:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate + preloadfmt: how to remove the warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828695#M327357</link>
      <description>&lt;P&gt;Preloadfmt &lt;STRONG&gt;cannot&lt;/STRONG&gt; use any "generic" format that does not provide a closed list of values. Sales, as a numeric value has literally an infinite number of possible values so the is no way to list "every value" which what Preloadfmt does for the output. Be glad it didn't even attempt it as your SAS session would be locked up trying to generate an output table with way more rows that I want to contemplate(you would run out of disk space, pretty much guaranteed)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Same with the $ format, even with a small value like $2. That is not a closed list of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should &lt;STRONG&gt;not&lt;/STRONG&gt; be attempting to use preloadfmt without knowing before hand the nature of the format. Or you might make sure that all of your custom formats create output data sets with the Cntlout option and then parse those files for the clues that might allow determination of the format details. SAS doesn't provide any closes list formats installed by default that I am aware of.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't know the format ahead of time why are you even contemplating Preloadfmt???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may also consider that Preloadfmt is not desirable for many reports. Consider a Zip code, or similar code with many values, that use with a format that reports the CountyName for the value. If I am doing a report that only includes a one region of the state then including the Preloadfmt version could well have 40+ counties reporting in multiple places where there is only data for four or five that are actually in the region. So the default assigned format, which I would use, but I would not use the Preloadfmt option as 80% of the cells in Proc Tabulate output would be empty without data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have formats such as for ICD-10 medical diagnosis codes you may have 10,000 values in a format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 20:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828695#M327357</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-15T20:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate + preloadfmt: how to remove the warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828796#M327414</link>
      <description>As written above, I don't know the name of the formats beforehand. My goal is not to use it when not relevant. My issue was to find out if the format was relevant or not. I've found a way (see the accepted solution). When I generate proc tabulate I exclude the option when the format is not relevant and I include it when it is relevant.</description>
      <pubDate>Tue, 16 Aug 2022 08:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-preloadfmt-how-to-remove-the-warning/m-p/828796#M327414</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2022-08-16T08:50:09Z</dc:date>
    </item>
  </channel>
</rss>

