<?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: SAS EG - Need help on accessing data from two different database (AS400 and DB2) in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/831864#M41369</link>
    <description>Hello everyone just to close this thread, I discovered that the issue is not me accessing two different database. But I was actually trying to update the dynamic list of the Stored Process using the code inside it which is not feasible. As a resolution, I created a separate program that will update the data source of the dynamic list first so I can use it once I ran the Stored Process. Anyway, thank you so much for all of your help. I really appreciate this community. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Tue, 06 Sep 2022 01:55:33 GMT</pubDate>
    <dc:creator>meatballs12345</dc:creator>
    <dc:date>2022-09-06T01:55:33Z</dc:date>
    <item>
      <title>SAS EG - Need help on accessing data from two different database (AS400 and DB2)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830211#M41292</link>
      <description>&lt;P&gt;Hi SAS Community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need your advise on this stored process changes I'm making. So, I am now trying to extract and merge the source of a list on my stored process and I used "union" for doing so. Now we noticed that when running the stored process, the list from LIB2.MASTER do not reflect but when we run the code manually (in a new program in SAS EG), it reflects successfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;create table WORKSD7.EG_RCL_INST_X_FI_LIST_temp as&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;select distinct case &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;when XXXXXX in (0, 5) then 'Commercial Bank'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;when XXXXXX in (1, 2, 3, 7) then 'Thrift Bank'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;when XXXXXX in (4, &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; then 'Rural Bank'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;when XXXXXX = 57 then 'Corporation'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;else 'Non-Bank Bank'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;end as INDNAME length=35, INST as FINST, (XXXXXX * 10000) + ENTITY as BKCODE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;from LIB1.INST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;union&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;select distinct case &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;when XXXXXX = 31 then 'Pawnshop'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;when XXXXXX = 60 then 'Money Service Businesses'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;else 'Non-Bank Bank'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;end as INDNAME length=35, FCONAME as FINST, (XXXXXX * 100000) + ENTITY as BKCODE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;from LIB2.MASTER;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;quit;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I noticed the difference between LIB1 and LIB2's DB connection. LIB1 is from AS400 and LIB2 is DB2. Now my question is, is the connection correct or is there a specific connection for DB2?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LIBNAME LIB1 DB2 Datasrc=XXXSYS2 SCHEMA=LIB1 USER=dwadmn PASSWORD="XXXXXXXXXXX" ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LIBNAME LIB2 DB2 UTILCONN_TRANSIENT=YES Datasrc=XXXSYS2 SCHEMA=LIB2 AUTHDOMAIN="DB2Auth" ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Really appreciate your answer. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 02:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830211#M41292</guid>
      <dc:creator>meatballs12345</dc:creator>
      <dc:date>2022-08-25T02:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG - Need help on accessing data from two different database (AS400 and DB2)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830215#M41293</link>
      <description>&lt;P&gt;Looks like you are using the SAS/Access DB2 engine for both tables. Are you reading a DB2 database on AS/400? Also your DATASRC is the same for both LIBNAMEs. That makes me suspicious that you are only reading from one database and not two.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 03:41:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830215#M41293</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-25T03:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG - Need help on accessing data from two different database (AS400 and DB2)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830222#M41295</link>
      <description>Ohh I didn't noticed that, but yes, checking it again, the DATASRC is the same. Also, may I know what you meant by  "Are you reading a DB2 database on AS/400?". I assumed it's DB2 because the tables under LIB1 is accessible on SAS EG, but for LIB2, I cannot view it and has to use proc sql or data step to check the contents of the table under LIB2.</description>
      <pubDate>Thu, 25 Aug 2022 05:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830222#M41295</guid>
      <dc:creator>meatballs12345</dc:creator>
      <dc:date>2022-08-25T05:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG - Need help on accessing data from two different database (AS400 and DB2)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830481#M41303</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;Also, may I know what you meant by "Are you reading a DB2 database on AS/400?"&lt;/EM&gt; - I asked that question as you are using the DB2 engine on the AS400 LIBNAME and you didn't identify what database was on your AS400. Since you can see tables from that LIBNAME, I assume it is working with DB2.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 04:44:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/830481#M41303</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-26T04:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG - Need help on accessing data from two different database (AS400 and DB2)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/831663#M41356</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/408900"&gt;@meatballs12345&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Looks like you are accessing tables from two different schemas in a db2 database on an AS400 server.&lt;BR /&gt;For the issue with stored process accesing one of the libraries, this post is an excellent reference.&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Administration-and-Deployment/Stored-Process-Runs-on-SAS-EG-but-not-on-Stored-Process-Web/td-p/747537/page/2" target="_blank"&gt;https://communities.sas.com/t5/Administration-and-Deployment/Stored-Process-Runs-on-SAS-EG-but-not-on-Stored-Process-Web/td-p/747537/page/2&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Hopefully the solutions mention therein will help&amp;nbsp; resolve your issues.&lt;BR /&gt;This blog post helps debugging stored process issue &lt;A href="https://blogs.sas.com/content/sgf/2021/10/20/debugging-a-stored-process-problem/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2021/10/20/debugging-a-stored-process-problem/&lt;/A&gt;.&lt;BR /&gt;If you stiil have issues please post the relevant sections of the logs.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Sep 2022 15:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/831663#M41356</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-09-03T15:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG - Need help on accessing data from two different database (AS400 and DB2)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/831864#M41369</link>
      <description>Hello everyone just to close this thread, I discovered that the issue is not me accessing two different database. But I was actually trying to update the dynamic list of the Stored Process using the code inside it which is not feasible. As a resolution, I created a separate program that will update the data source of the dynamic list first so I can use it once I ran the Stored Process. Anyway, thank you so much for all of your help. I really appreciate this community. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 06 Sep 2022 01:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-Need-help-on-accessing-data-from-two-different-database/m-p/831864#M41369</guid>
      <dc:creator>meatballs12345</dc:creator>
      <dc:date>2022-09-06T01:55:33Z</dc:date>
    </item>
  </channel>
</rss>

