<?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 How do you define the width of a format value name? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-define-the-width-of-a-format-value-name/m-p/851552#M37379</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, if you have the following format:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format
  value $test 
    'a' = 'Access'
    'd' = 'Decline';
run;&lt;BR /&gt;&lt;BR /&gt;format&amp;nbsp;example&amp;nbsp;$test.;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will provide the format name $test with a width of 6. If there is a value in the var example such as 'abcdefgh', then it'll be displayed as 'abcdef' and 'gh' will be truncated. How do you set the width of $test or did I misunderstand PROC FORMAT completely when it comes to width?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Dec 2022 21:10:10 GMT</pubDate>
    <dc:creator>cosmid</dc:creator>
    <dc:date>2022-12-29T21:10:10Z</dc:date>
    <item>
      <title>How do you define the width of a format value name?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-define-the-width-of-a-format-value-name/m-p/851552#M37379</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, if you have the following format:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format
  value $test 
    'a' = 'Access'
    'd' = 'Decline';
run;&lt;BR /&gt;&lt;BR /&gt;format&amp;nbsp;example&amp;nbsp;$test.;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will provide the format name $test with a width of 6. If there is a value in the var example such as 'abcdefgh', then it'll be displayed as 'abcdef' and 'gh' will be truncated. How do you set the width of $test or did I misunderstand PROC FORMAT completely when it comes to width?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 21:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-define-the-width-of-a-format-value-name/m-p/851552#M37379</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2022-12-29T21:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define the width of a format value name?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-define-the-width-of-a-format-value-name/m-p/851553#M37380</link>
      <description>&lt;P&gt;Optional argument on the VALUE statement :&lt;/P&gt;
&lt;DIV class="xisDoc-refProc"&gt;
&lt;DIV class="xisDoc-refBlock"&gt;
&lt;DIV class="xisDoc-syntax"&gt;
&lt;DIV class="xisDoc-syntaxDescription"&gt;
&lt;DIV class="xisDoc-optionalArgGroup"&gt;
&lt;DIV id="p0okqjurxwjgocn1muw3cfbip2g0" class="xisDoc-argDescriptionPair"&gt;
&lt;H4 class="xisDoc-argument"&gt;DEFAULT=&lt;EM class="xisDoc-userSuppliedValue"&gt;length&lt;/EM&gt;&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P&gt;&lt;SPAN class="xisDoc-shortDescription"&gt;specifies the default length of the format.&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN class="xisDoc-paraSimpleFirst"&gt; The value for DEFAULT= becomes the length of the format if you do not give a specific length when you associate the format with a variable.&lt;/SPAN&gt;&lt;/P&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryDefault"&gt;Default&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;The length of the longest label that is assigned to the right of the equal sign&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryRange"&gt;Range&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;1–32767&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryTip"&gt;Tip&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;As a best practice, always specify the DEFAULT= option if you specify a format as a label.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Dec 2022 21:16:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-define-the-width-of-a-format-value-name/m-p/851553#M37380</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-12-29T21:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define the width of a format value name?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-define-the-width-of-a-format-value-name/m-p/851555#M37382</link>
      <description>Thank you Koen!</description>
      <pubDate>Thu, 29 Dec 2022 21:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-define-the-width-of-a-format-value-name/m-p/851555#M37382</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2022-12-29T21:29:53Z</dc:date>
    </item>
  </channel>
</rss>

