<?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: Warnings and Truncating will occur in PROC APPEND in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795661#M255239</link>
    <description>Yeah. You are right . the longer length is more safe .</description>
    <pubDate>Fri, 11 Feb 2022 13:56:36 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-02-11T13:56:36Z</dc:date>
    <item>
      <title>Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795649#M255232</link>
      <description>&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;Hi Team,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;While appending the datasets using proc append with the Force option, one variable is of different length in the source and target.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;I am getting the warning message that of varying lengths and the values has been truncated for this variable.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif" color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;WARNING: Variable Cur_City has different lengths on BASE and DATA files &lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif" color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;(BASE 22 DATA 50).&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif" color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;NOTE: FORCE is specified, so dropping/truncating will occur.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;Also checked using the Proc Print, the values of curr_city has been truncated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;I can't use the &lt;STRONG&gt;options varlenchk=nowarn&lt;/STRONG&gt; as it is unacceptable for the warnings to suppress in the Live environment.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;Can anyone suggest the ideas on how to proceed further without the truncated values and warnings.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;Thanking You,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;Siddhu1&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 13:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795649#M255232</guid>
      <dc:creator>siddhu1</dc:creator>
      <dc:date>2022-02-11T13:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795650#M255233</link>
      <description>&lt;P&gt;Change the length of the variable in the BASE data set to 50, before you run PROC APPEND.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 13:18:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795650#M255233</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-02-11T13:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795658#M255237</link>
      <description>&lt;P&gt;As Paige said , change the variable length in DATA file.&lt;/P&gt;
&lt;P&gt;But make sure you would not lost any information in Cur_City .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.class;
run;


proc sql;
alter table have 
modify name char(22);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 13:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795658#M255237</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-02-11T13:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795660#M255238</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;As Paige said , change the variable length in DATA file.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I said the opposite, change the length in the BASE data set.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 13:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795660#M255238</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-02-11T13:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795661#M255239</link>
      <description>Yeah. You are right . the longer length is more safe .</description>
      <pubDate>Fri, 11 Feb 2022 13:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795661#M255239</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-02-11T13:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795673#M255241</link>
      <description>I will change the variable length and try.&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;Siddhu1</description>
      <pubDate>Fri, 11 Feb 2022 14:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795673#M255241</guid>
      <dc:creator>siddhu1</dc:creator>
      <dc:date>2022-02-11T14:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795698#M255252</link>
      <description>&lt;P&gt;Or use a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new_base;
if 0 then set append; /* gets length from new dataset, but does nothing else */
set
  base
  append
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Feb 2022 16:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795698#M255252</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-11T16:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795719#M255254</link>
      <description>&lt;P&gt;Down side to this approach is APPEND doesn't process the base data, where as datastep will&lt;BR /&gt;So if you only need to append a few observations to a large base dataset then data step will be less efficient.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 17:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795719#M255254</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2022-02-11T17:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795752#M255265</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226241"&gt;@AMSAS&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Down side to this approach is APPEND doesn't process the base data, where as datastep will&lt;BR /&gt;So if you only need to append a few observations to a large base dataset then data step will be less efficient.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, but if you need to adapt the base dataset to a new structure anyway (as in this case), the data step does both actions in one step.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 18:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795752#M255265</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-11T18:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795814#M255297</link>
      <description>Kurt,&lt;BR /&gt;I like your code.&lt;BR /&gt;But what if one variable is smaller in BASE, another variable is smaller in APPEND ?</description>
      <pubDate>Sat, 12 Feb 2022 03:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795814#M255297</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-02-12T03:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Warnings and Truncating will occur in PROC APPEND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795818#M255301</link>
      <description>&lt;P&gt;Then we need some coding that reads the max length from dictionary.columns and builds a LENGTH statement to use in place of the IF 0 THEN SET.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Feb 2022 06:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warnings-and-Truncating-will-occur-in-PROC-APPEND/m-p/795818#M255301</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-12T06:18:16Z</dc:date>
    </item>
  </channel>
</rss>

