<?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: Accessing db2 column that has name more than 18 characters in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515527#M15062</link>
    <description>&lt;P&gt;issue was resolved by upgrading the db2 client in mac, where sas compute installed&lt;/P&gt;</description>
    <pubDate>Fri, 23 Nov 2018 11:44:10 GMT</pubDate>
    <dc:creator>saivenkat</dc:creator>
    <dc:date>2018-11-23T11:44:10Z</dc:date>
    <item>
      <title>Accessing db2 column that has name more than 18 characters</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515308#M15050</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error below throwing while accessing the db2 table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: This DBMS table or view cannot be accessed by the SAS System because it contains column names that are not unique when a SAS normalized (uppercased) compare is performed.&amp;nbsp; See "Naming Conventions" in the SAS/ACCESS documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Analysis:&lt;/P&gt;&lt;P&gt;DB2 table has got 2 different columns having names as&amp;nbsp;&lt;SPAN&gt;CAUSALPARTNOPREFIX, and CAUSALPARTNOPREFIXWID. The column&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;CAUSALPARTNOPREFIXWID length&lt;/SPAN&gt;&amp;nbsp;exceeding 18 characters&amp;nbsp;so SAS reading first 18 characters only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS reading the same column until last week without any issues, and we have the issue above beginning of 19th Nov 2018.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have 2 different environments qa and production. Above issue persists with production environment only, so I did compare the environments using the steps below&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro cmp(command);
filename p pipe &amp;amp;command lrecl=32767;
data _null_;
infile p;
input;
put _infile_;
run;
%mend;
option LS=256;
%cmp("set");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And noticed one of the environment variables IBM_DB_HOME&amp;nbsp;missing in production, added it to the sasuser and ensure it appear back in production but it didn't work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tried to execute the below in both the environments for comparison but no success yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,d,d' sastraceloc=saslog nostsuffix;

proc sql;
describe table tstpro.claimjob_ccd;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ACCESS ENGINE:&amp;nbsp; Exiting dbidsci with ERROR, rc=0x80121023&lt;/P&gt;&lt;P&gt;production environment showing the above error, but no details available on web to explore&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips to debug further would be appreciated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 12:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515308#M15050</guid>
      <dc:creator>saivenkat</dc:creator>
      <dc:date>2018-11-22T12:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing db2 column that has name more than 18 characters</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515318#M15051</link>
      <description>&lt;P&gt;From where do you get that it fails at 18 bytes, and not at 16?&lt;/P&gt;
&lt;P&gt;I ask because SAS has a limit of 32 characters for names, and I have the suspicion that someone used unicode for the column names, causing hex 00's to be inserted after every character.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 10:04:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515318#M15051</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-22T10:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing db2 column that has name more than 18 characters</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515323#M15052</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The table &lt;SPAN&gt;CLAIMJOB_CCD&amp;nbsp;&lt;/SPAN&gt;has 59 columns, out of which only the column&amp;nbsp;&lt;SPAN&gt;name&amp;nbsp;CAUSALPARTNOPREFIXWID&amp;nbsp;&lt;SPAN&gt;exceeding the length of 18 characters and other column exists with the name&amp;nbsp;CAUSALPARTNOPREFIX so the access issue persists against this table.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SQL pass through working fine but ignoring the column&amp;nbsp;&lt;SPAN&gt;CAUSALPARTNOPREFIXWID with the warning below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL ;
connect to db2 as db1 (database=xx USER=xxx PASSWORD="{SAS002}xxx" );
create table test as
select *
from connection to db1 (SELECT * FROM xxx.CLAIMJOB_CCD FETCH FIRST 3 ROWS ONLY); 
disconnect from db1;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;WARNING: Variable CAUSALPARTNOPREFIX already exists on file WORK.TEST.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NOTE: Table WORK.TEST created, with 3 rows and 58 columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, same table can be accessed directly from DB2 client environment(client(SAS EG/DI) mac and SAS Compute mac)&amp;nbsp; without any issues. Other SAS environment(QA) not having any issues while accessing the same table, which pointed to same data source name so I suspect some problem with SAS environment(production) but not able to pin point where the problem is&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 12:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515323#M15052</guid>
      <dc:creator>saivenkat</dc:creator>
      <dc:date>2018-11-22T12:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing db2 column that has name more than 18 characters</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515363#M15053</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;explains clearly what is happening. SAS/Access truncates column names to length 32 and if you two columns whose names are close, after truncation they become same. I saw this happening when I was using hive tables and using SAS/Access. this is what you can do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;instead of select * you can try below in pass through&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select col, col2,&amp;nbsp;&lt;SPAN&gt;CAUSALPARTNOPREFIXWID as newcol,&amp;nbsp;CAUSALPARTNOPREFIX as newcol2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;from your table&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;or in datastep try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data saslib.yourtable;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;set db2lib.yourtable(rename= (CAUSALPARTNOPREFIXWID&amp;nbsp;= newcol CAUSALPARTNOPREFIX&amp;nbsp;= newcol2))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 14:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515363#M15053</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-11-22T14:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing db2 column that has name more than 18 characters</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515527#M15062</link>
      <description>&lt;P&gt;issue was resolved by upgrading the db2 client in mac, where sas compute installed&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 11:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Accessing-db2-column-that-has-name-more-than-18-characters/m-p/515527#M15062</guid>
      <dc:creator>saivenkat</dc:creator>
      <dc:date>2018-11-23T11:44:10Z</dc:date>
    </item>
  </channel>
</rss>

