<?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: Requesting Format name length - Value vs datasets(control sets) clarification please? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668394#M200347</link>
    <description>&lt;P&gt;I think you are confusing the name of the format (which is limited to 32 characters) and an actual format specification.&amp;nbsp; A format specification must include a period (so 33 characters) and can also include a width and decimal places numbers.&amp;nbsp; Since the maximum length SAS allows for character strings is 32,767 the maximum number of digits needed for the width is 5.&amp;nbsp; I suspect that the maximum number of digits that are allowed for decimal places is much smaller than 32,767.&amp;nbsp; I have normally seen people use a length of 41 for a variable that is used to store a format specification.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jul 2020 15:08:38 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-07-10T15:08:38Z</dc:date>
    <item>
      <title>Requesting Format name length - Value vs datasets(control sets) clarification please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668349#M200327</link>
      <description>&lt;P&gt;Good morning folks,&lt;/P&gt;
&lt;P&gt;I would like to use a dataset contents as formats using control options(CNTLIN/OUT), however I want to be absolutely sure of the lengths and names of format names that my dataset &lt;STRONG&gt;concatenated&lt;/STRONG&gt; variables that would&amp;nbsp; go as FMTNAME. My concern is that I vaguely remember fmtnames in value/pic formats do not exceed 32 chars. I also vaguely remember the FMTNAME from a dataset doesn't quite have to conform to that rule??? I did a below test and it seems to be fine up to 40 chars, yet I want to confirm with you before I write the full code and move to production.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know you would quite likely ask whether have I read the docs, hmm not quite. I am being cheeky here as I am really not feeling well and am tired this morning and would like some help. Pardon me please!&amp;nbsp; Some confirmation from you folks will give me the confidence after all. That's my need!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS Any additional caution, please please please let me know-&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data fmt;
/*Assign a lengthy fmtname*/
 retain fmtname 'abcfkjjhgfkljsebnglwkjengkljwejnrwkjnjnrgvkjsnbvkjaesnbrkfbnabnvlseajbndlksjnvdasdbnsk';
 start=1;
 end=5;
 label='ok';
 output;
 start=.;
 end=.;
 label='NA';
 hlo='o';
 output;
run;

proc format cntlin=fmt fmtlib;
run;

data test;
 set fmt(keep=fmtname);
 do i=1 to 10;
  need=putn(i,fmtname);
  output;
 end;
 stop;
run;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The MAX LENGTH takes 40 chars. Can this be modified to accommodate higher lengths?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 14:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668349#M200327</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-07-10T14:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Format name length - Value vs datasets(control sets) clarification please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668355#M200328</link>
      <description>&lt;P&gt;When you look at the output of proc format. you will see that the name has been truncated.&lt;/P&gt;
&lt;P&gt;So while you can use longer variables, everything after character 32 (or 31 for character formats) will have no effect, and such names might lead to funny results (inadvertently "concatenated" or replaced formats).&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668355#M200328</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-10T12:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Format name length - Value vs datasets(control sets) clarification please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668391#M200345</link>
      <description>&lt;P&gt;Just out of curiousity, adding on to this question, do you need to leave spaces in the name for the width and decimal portion?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know the format may not use that, but it's sort of an implicit parameter in any format if I understand correctly (which may not be right at all).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 14:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668391#M200345</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-10T14:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Format name length - Value vs datasets(control sets) clarification please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668394#M200347</link>
      <description>&lt;P&gt;I think you are confusing the name of the format (which is limited to 32 characters) and an actual format specification.&amp;nbsp; A format specification must include a period (so 33 characters) and can also include a width and decimal places numbers.&amp;nbsp; Since the maximum length SAS allows for character strings is 32,767 the maximum number of digits needed for the width is 5.&amp;nbsp; I suspect that the maximum number of digits that are allowed for decimal places is much smaller than 32,767.&amp;nbsp; I have normally seen people use a length of 41 for a variable that is used to store a format specification.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 15:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-Format-name-length-Value-vs-datasets-control-sets/m-p/668394#M200347</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-10T15:08:38Z</dc:date>
    </item>
  </channel>
</rss>

