× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If MYLIB exists on machine B, you can qualify your SQL.

select * from MYLIB/MYFILE
where etc.

Gord Royle

-----Original Message-----
From: Urbanek, Marty [mailto:Marty_Urbanek@xxxxxxxxxxxx]
Sent: Monday, March 17, 2003 8:03 AM
To: 'midrange-l@xxxxxxxxxxxx'
Subject: Remote DB2 SQL access, Library List


Assume my database resides on machine A in library MYLIB.

If I am signed on machine A, I can do a STRSQL and then issue a statement
such as:

select * from MYFILE
where DEF_NAME='SearchArg'
ORDER BY SOME_FIELD

The query works fine in that scenario, where I issue the query from the same
machine where the database resides. MYLIB is my CURLIB when I do the STRSQL.

However, if I am signed on machine B, do a STRSQL, SQL "connect" to machine
A (which is defined by RDBDIRE), and issue the same select statement, it
fails because it cannot find the table.

How can I get MYLIB into my library list, or do something so that it can
find the table without modifying the select syntax? I am aware that I can
modify the select to include the library or collection, such as "select *
from MYLIB/MYFILE", but the SQL is coming from another platform and it is
undesirable to have to change it.

Is there some other way I can help the query find the table in MYLIB when it
is issued remotely, perhaps by somehow setting the "default collection" or
controlling the library list of a server job on machine A? 

It seems like addind MYLIB to QSYSLIBL would work, but I would hate to do
something that pervasive.

THANKS,
-Marty
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.