<?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 proc format truncates values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-format-truncates-values/m-p/696314#M212660</link>
    <description>&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;format&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;value $mystage&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Apps' =&amp;nbsp; 'PROD OPS #: APPS'&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Closed' = 'PROD OPS #: CLOSING'&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Processing' = 'PROD OPS #: PROCESSING'&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Underwriting' =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'PROD OPS #: UNDERWRITING'&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; loancount_;&lt;/P&gt;
&lt;P&gt;set loancount;&lt;/P&gt;
&lt;P&gt;length stage $&lt;STRONG&gt;85&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;length processing_center purps_cd $&lt;STRONG&gt;55&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;if PROCESSING_CENTER eq '' then processing_center = 'NO_LOB';/*2538283*/&lt;/P&gt;
&lt;P&gt;if UNDERWRITING_CAMPUS eq '' then UNDERWRITING_CAMPUS = 'NO_LOB';/*2538283*/&lt;/P&gt;
&lt;P&gt;if Closing_CAMPUS eq '' then Closing_CAMPUS = 'NO_LOB'; /*2538283*/&lt;/P&gt;
&lt;P&gt;stage = put(stage,mystage.);&lt;/P&gt;
&lt;P&gt;processing_center = put(processing_center,myproc.);&lt;/P&gt;
&lt;P&gt;purps_cd = put(purps_cd,mypurp.);&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The report populates however when it encounters the 'PROD OPS #:Underwriting' =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'PROD OPS #: UNDERWRITING'&lt;/P&gt;
&lt;P&gt;It truncates (leaves off) the g.&amp;nbsp; It just shows UNDERWRITIN&amp;nbsp;&amp;nbsp; All other stages display without incident.&amp;nbsp; When I truncate the space in proc format for Underwriting it displays ok.&amp;nbsp; Is there a limit on character length?&amp;nbsp; I realize Underwriting has the longest length in this example.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2020 20:06:42 GMT</pubDate>
    <dc:creator>Q1983</dc:creator>
    <dc:date>2020-11-03T20:06:42Z</dc:date>
    <item>
      <title>proc format truncates values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-truncates-values/m-p/696314#M212660</link>
      <description>&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;format&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;value $mystage&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Apps' =&amp;nbsp; 'PROD OPS #: APPS'&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Closed' = 'PROD OPS #: CLOSING'&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Processing' = 'PROD OPS #: PROCESSING'&lt;/P&gt;
&lt;P&gt;'PROD OPS #:Underwriting' =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'PROD OPS #: UNDERWRITING'&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; loancount_;&lt;/P&gt;
&lt;P&gt;set loancount;&lt;/P&gt;
&lt;P&gt;length stage $&lt;STRONG&gt;85&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;length processing_center purps_cd $&lt;STRONG&gt;55&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;if PROCESSING_CENTER eq '' then processing_center = 'NO_LOB';/*2538283*/&lt;/P&gt;
&lt;P&gt;if UNDERWRITING_CAMPUS eq '' then UNDERWRITING_CAMPUS = 'NO_LOB';/*2538283*/&lt;/P&gt;
&lt;P&gt;if Closing_CAMPUS eq '' then Closing_CAMPUS = 'NO_LOB'; /*2538283*/&lt;/P&gt;
&lt;P&gt;stage = put(stage,mystage.);&lt;/P&gt;
&lt;P&gt;processing_center = put(processing_center,myproc.);&lt;/P&gt;
&lt;P&gt;purps_cd = put(purps_cd,mypurp.);&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The report populates however when it encounters the 'PROD OPS #:Underwriting' =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'PROD OPS #: UNDERWRITING'&lt;/P&gt;
&lt;P&gt;It truncates (leaves off) the g.&amp;nbsp; It just shows UNDERWRITIN&amp;nbsp;&amp;nbsp; All other stages display without incident.&amp;nbsp; When I truncate the space in proc format for Underwriting it displays ok.&amp;nbsp; Is there a limit on character length?&amp;nbsp; I realize Underwriting has the longest length in this example.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 20:06:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-truncates-values/m-p/696314#M212660</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2020-11-03T20:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc format truncates values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-truncates-values/m-p/696316#M212661</link>
      <description>&lt;P&gt;Since I don't have your data, I can't run your code (and you should really show us the log so we can see the code and any ERRORs, WARNINGs and NOTEs, although I assume you have looked there already).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What if you assign a default length for the format, such as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;value $mystage(default=55) ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And you are missing a $, are you not?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;stage = put(stage,$mystage.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 20:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-truncates-values/m-p/696316#M212661</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-03T20:17:27Z</dc:date>
    </item>
  </channel>
</rss>

