<?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: Length of character variable in existing SAS table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Length-of-character-variable-in-existing-SAS-table/m-p/560853#M156913</link>
    <description>read the database with explicit passthru SQL.  It should create the text field with the appropriate length.</description>
    <pubDate>Wed, 22 May 2019 14:21:42 GMT</pubDate>
    <dc:creator>tomrvincent</dc:creator>
    <dc:date>2019-05-22T14:21:42Z</dc:date>
    <item>
      <title>Length of character variable in existing SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Length-of-character-variable-in-existing-SAS-table/m-p/560845#M156911</link>
      <description>&lt;P&gt;I have an existing SAS table that is produced from my company's SQL database. One of the fields contains each record's audit trail and I am trying to parse that field for reporting purposes. When I read the table into SAS the length, format, and informat are 2000 which is truncating some of the data contained in the field. I have tried changing the length, format, and informat as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;

length audit $ 10000; informat audit $10000.; format audit $10000.;

set datain.have;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, the result is still a truncation at 2000 characters. I'm assuming there is nothing else I can do in SAS and need to contact the SQL DB admin to change the format of the field in the source data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Length-of-character-variable-in-existing-SAS-table/m-p/560845#M156911</guid>
      <dc:creator>lbarwick</dc:creator>
      <dc:date>2019-05-22T14:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Length of character variable in existing SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Length-of-character-variable-in-existing-SAS-table/m-p/560853#M156913</link>
      <description>read the database with explicit passthru SQL.  It should create the text field with the appropriate length.</description>
      <pubDate>Wed, 22 May 2019 14:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Length-of-character-variable-in-existing-SAS-table/m-p/560853#M156913</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2019-05-22T14:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Length of character variable in existing SAS table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Length-of-character-variable-in-existing-SAS-table/m-p/560863#M156917</link>
      <description>&lt;P&gt;If you are reading the data from a remote database check or change the setting for DBMAX_TEXT&amp;nbsp; option on the libname or connect statement.&amp;nbsp; SAS will normally truncate long character values to that maximum length before moving the data to SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Length-of-character-variable-in-existing-SAS-table/m-p/560863#M156917</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-22T14:50:55Z</dc:date>
    </item>
  </channel>
</rss>

