<?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 Format) custom formats that change with length in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624211#M183848</link>
    <description>&lt;P&gt;You really need to be specific about how you expect to use it.&lt;/P&gt;
&lt;P&gt;That is already built into custom&amp;nbsp;formats with the options DEFAULT and MAX . Default sets the default display length, calculated from values if not supplied. You can specify any n up to the default. If you specify a value for MAX in the format then you can specify the display length n&amp;nbsp;up to that value. Appearance in output will be highly dependent on procedure used as most will left justify output by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With custom formats to insert leading spaces you will likely need to use a Put option -R.&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
value mynum ( max=30)
1 ='one';
run;


data junk;;
   term=1;

put term mynum. -r; 
put term mynum3.-r;
put term mynum9.-r;
put term mynum20.-r; 
run;
&lt;/PRE&gt;
&lt;P&gt;Other than report procedures you may not get leading space appearance without modifying table templates for ODS objects.&lt;/P&gt;
&lt;P&gt;In report procedures such as Report or Tabulate you would need to use the Style override ASIS to get leading spaces.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2020 15:39:21 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-02-12T15:39:21Z</dc:date>
    <item>
      <title>(Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624198#M183838</link>
      <description>&lt;P&gt;Is there a way to create a &lt;STRONG&gt;custom&lt;/STRONG&gt; &lt;STRONG&gt;format&lt;/STRONG&gt; that changes depending on the length specified when the format is applied?&amp;nbsp; For example, how WORDDATE changes format depending on the length given (3, 9, 12, and 20).&lt;/P&gt;
&lt;H1 class="xis-title" style="background-color: transparent; box-sizing: border-box; color: #333333; font-family: &amp;amp;quot; avenirnext&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 22.73px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 25px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; margin: 22.73px 0px 10px 0px;"&gt;&lt;FONT size="3"&gt;&lt;A id="p0ls13my9ksj76n13qptgimvjm5u" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;" target="_blank"&gt;&lt;/A&gt;WORDDATE Format&lt;/FONT&gt;&lt;/H1&gt;
&lt;P class="xis-shortDescription" style="background-color: transparent; border-top-color: #d1d5db; border-top-style: solid; border-top-width: 2px; box-sizing: border-box; color: #333333; font-family: &amp;amp;quot; avenirnext&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; padding-top: 9.8px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; margin: 0px 0px 2.8px 0px;"&gt;Writes date values as the name of the month, the day, and the year in the form &lt;SPAN class="xis-userSuppliedValue" style="box-sizing: border-box; font-style: italic;"&gt;month-name dd&lt;/SPAN&gt;, &lt;SPAN class="xis-userSuppliedValue" style="box-sizing: border-box; font-style: italic;"&gt;yyyy&lt;/SPAN&gt;.&lt;/P&gt;
&lt;DIV class="xis-paragraph" id="n0ibk4ivu7ne63n1mfi6sdazco3f" style="background-color: transparent; box-sizing: border-box; color: #333333; font-family: &amp;amp;quot; avenirnext&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-top: 19.6px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;The example table uses the input value of 19158, which is the SAS date value that corresponds to June 14, 2012.&lt;/DIV&gt;
&lt;DIV class="xis-table" style="background-color: transparent; box-sizing: border-box; color: #333333; font-family: &amp;amp;quot; avenirnext&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-top: 19.6px; orphans: 2; overflow: auto; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;A id="p0ca4406hmbhl0n16ua8uyu0sbd6" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration: none;" target="_blank"&gt;&lt;/A&gt;
&lt;TABLE class="tgroup" style="background-color: transparent; border-collapse: collapse; border-spacing: 0px 0px; box-sizing: border-box; overflow: auto;"&gt;
&lt;TBODY style="box-sizing: border-box;"&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; font-weight: 600; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0wwnxrakcj1rvn1sm6lcpfntmgs" style="box-sizing: border-box; font-size: 14.06px; font-weight: 600; margin-top: 0px;"&gt;SAS Statement&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; font-weight: 600; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1w4kdn38thh31n1awqnabzrxrbc" style="box-sizing: border-box; font-size: 14.06px; font-weight: 600; margin-top: 0px;"&gt;Result&lt;/DIV&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p13ya0ha7ojgrpn1w9nod7x4mjt2" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;put term worddate3.; &lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n19ival0oowb3pn1ez5f1y881fcs" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;Jun&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1qbnepf8nw9men1gk3peejgn6p3" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt; 
put term worddate9.;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n0kot0eezhtum0n1gxf55en2qq60" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-outputFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;SPAN class="xis-columnRuler" aria-hidden="true" style="box-sizing: border-box; color: #5d6065;"&gt;----+----1----+----2&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;     June&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p00rg6546thvpgn1lxt4kpiy9x6z" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;put term worddate12.;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p1n0krlsi0c9oln1h5av7n311ywc" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;Jun 14, 2012&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p18cmzh1t9yp6bn1bcuy71e280h8" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt; 
put term worddate20.; &lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 0.5px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 0.5px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n068uzjnw2vz24n1g1ps49qxvuws" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-outputFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;SPAN class="xis-columnRuler" aria-hidden="true" style="box-sizing: border-box; color: #5d6065;"&gt;----+----1----+----2&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;       June 14, 2012&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Feb 2020 15:07:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624198#M183838</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-02-12T15:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: (Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624201#M183840</link>
      <description>&lt;P&gt;Yes. What logic do you want in the format?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 15:06:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624201#M183840</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-02-12T15:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: (Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624203#M183841</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt; :&lt;/P&gt;
&lt;P&gt;For a hypothetical example&amp;nbsp;take fiscal year FMTNAME="FY".&amp;nbsp; Define a format such that the format would help produce these results:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="tgroup" style="background-color: transparent; border-collapse: collapse; border-spacing: 0px 0px; box-sizing: border-box; color: #333333; font-family: &amp;amp;quot; avenirnext&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow: auto; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;
&lt;TBODY style="box-sizing: border-box;"&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; font-weight: 600; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p0wwnxrakcj1rvn1sm6lcpfntmgs" style="box-sizing: border-box; font-size: 14.06px; font-weight: 600; margin-top: 0px;"&gt;SAS Statement&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; font-weight: 600; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1w4kdn38thh31n1awqnabzrxrbc" style="box-sizing: border-box; font-size: 14.06px; font-weight: 600; margin-top: 0px;"&gt;Result&lt;/DIV&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p13ya0ha7ojgrpn1w9nod7x4mjt2" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;FONT face="terminal,monaco"&gt;put today Fy6.; &lt;/FONT&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n19ival0oowb3pn1ez5f1y881fcs" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;FY1920&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n1qbnepf8nw9men1gk3peejgn6p3" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;FONT face="terminal,monaco"&gt;put&lt;/FONT&gt; &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;today Fy7.;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n0kot0eezhtum0n1gxf55en2qq60" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;FY19-20&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p00rg6546thvpgn1lxt4kpiy9x6z" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;FONT face="terminal,monaco"&gt;put &lt;SPAN style="background-color: transparent; color: #333333; cursor: text; display: inline; float: none; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;today Fy9.;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p1n0krlsi0c9oln1h5av7n311ywc" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;SPAN style="background-color: transparent; color: #333333; cursor: text; display: inline; float: none; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;FY2019-20&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="box-sizing: border-box; vertical-align: top;"&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="p18cmzh1t9yp6bn1bcuy71e280h8" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;p&lt;FONT face="terminal,monaco"&gt;ut &lt;SPAN style="background-color: transparent; color: #333333; cursor: text; display: inline; float: none; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;t&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #333333; cursor: text; display: inline; float: none; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;oday Fy11.;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop" style="border-bottom-color: #e0e2e5; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #e0e2e5; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; text-align: left; vertical-align: top; padding: 2.8px 7px 5.6px 7px;"&gt;
&lt;DIV class="xis-paraTableFirst" id="n068uzjnw2vz24n1g1ps49qxvuws" style="box-sizing: border-box; font-size: 14.06px; font-weight: 400; margin-top: 0px;"&gt;
&lt;PRE class="xis-codeFragment" style="background-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-top-left-radius: 0px; border-top-right-radius: 0px; box-sizing: border-box; color: #353535; display: block; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15.2px; line-height: 21.71px; overflow: auto; word-break: break-all; padding: 0px 7.6px 0px 0px; margin: 0px; border: 0px none #353535;"&gt;&lt;SPAN style="background-color: transparent; color: #333333; cursor: text; display: inline; float: none; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;FY2019-2020&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:05:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624203#M183841</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-02-12T18:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: (Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624211#M183848</link>
      <description>&lt;P&gt;You really need to be specific about how you expect to use it.&lt;/P&gt;
&lt;P&gt;That is already built into custom&amp;nbsp;formats with the options DEFAULT and MAX . Default sets the default display length, calculated from values if not supplied. You can specify any n up to the default. If you specify a value for MAX in the format then you can specify the display length n&amp;nbsp;up to that value. Appearance in output will be highly dependent on procedure used as most will left justify output by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With custom formats to insert leading spaces you will likely need to use a Put option -R.&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
value mynum ( max=30)
1 ='one';
run;


data junk;;
   term=1;

put term mynum. -r; 
put term mynum3.-r;
put term mynum9.-r;
put term mynum20.-r; 
run;
&lt;/PRE&gt;
&lt;P&gt;Other than report procedures you may not get leading space appearance without modifying table templates for ODS objects.&lt;/P&gt;
&lt;P&gt;In report procedures such as Report or Tabulate you would need to use the Style override ASIS to get leading spaces.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 15:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624211#M183848</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-02-12T15:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: (Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624220#M183852</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15329"&gt;@PhilC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know it is not the answer to your question but may FCMP will be sufficient?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options cmplib = _null_;
proc fcmp outlib = work.f.p;
  function FY(x,l) $ 11;
    length val $ 11;
    select;
      when (1&amp;lt;= l &amp;lt;= 6) do; val = cats("FY",mod(year(x)-1,100),mod(year(x),100)); end; 
      when (    l  &amp;lt; 9) do; val = cats("FY",mod(year(x)-1,100),"-",mod(year(x),100)); end;
      when (    l  &amp;lt; 11) do; val = cats("FY",year(x)-1,"-",mod(year(x),100)); end;
      when (    l  = 11) do; val = cats("FY",year(x)-1,"-",year(x)); end;
      otherwise val="**";
    end;
    return (val);
  endsub;
run;

options cmplib = work.f;

data test;
  array a[12] $ 11;
  do i=1 to 12;
    a[i]=FY(today(),i);
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 15:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624220#M183852</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-02-12T15:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: (Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624253#M183872</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; , thanks, but that example is just way too trivial and not at all helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the PUT -r option is something that I find that I could use, in another context, and that I didn't previously know about.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 17:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624253#M183872</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-02-12T17:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: (Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624297#M183896</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15329"&gt;@PhilC&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; , thanks, but that example is just way too trivial and not at all helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the PUT -r option is something that I find that I could use, in another context, and that I didn't previously know about.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, since you didn't specify how you want an example to work and picked on Date values, which SAS does some very interesting things not shown to us (such as not displaying years past 9999 in any way shape or form even though the date manipulation functions don't have issues until around year 20,000) couldn't come with anything other than trivial.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Examples of actual values and the changing appearance desired would be needed to get a more realistic example.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 19:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/624297#M183896</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-02-12T19:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: (Proc Format) custom formats that change with length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/625120#M184229</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; , you're right, I need to re-word my question</description>
      <pubDate>Sun, 16 Feb 2020 15:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Format-custom-formats-that-change-with-length/m-p/625120#M184229</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-02-16T15:45:58Z</dc:date>
    </item>
  </channel>
</rss>

