ODBC Request from iSeries to Excel

pts.
Tags:
AS/400
DB2 Universal Database
Microsoft Office
SQL
I am trying to use an ODBC DSN I have created, that uses the iSeries Access for Windows Driver, to download data from a file in QUSRSYS, to Excel. I have to download from QUSRSYS because the file is IBM supplied. Note: QUSRSYS appears in QSYSLIBL system value. The problem I have is that unless I manually type the SQL statement (which is a pain, as I need about 45 fields)I cannot get the ODBC wizard to use QUSRSYS. In fact, it will not use any library in QSYSLIBL. Instead, it always refers to the libraries in QUSRLIBL. I have tried changing all the library references and definitions within the DSN but to no avail. If I change the DSN to use any other, non-QSYSLIBL library, it works fine. Is there some iSeries/ODBC restriction on the use of QSYSLIBL libraries? Or something I must set on the Server? Any help would be much appreciated. Thanks.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Your DSN is OK: manual sql is successfull.
it seems to me that you can adapt your problem :

If you type in manual sql select * from … then clic on the button to show the graphic assistant, does MSQuery shows the file fields ? if yes, you have force msquery to help you

other way : in one of your *USRLIBL, create a VIEW that contains your shortcut :
create view mylib/myshortcut as select * from qusrsys/…

last but not least : there is some ways to declare the library list in the DSN (yes, a list, not only one lib), and depending on where is the first comma, search rules in the server are changed.
Drag the net for details, I have not now a 400 under hand

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Since the file is necessarily in QUSRSYS, why is the library list important at all. Just qualify the reference and don't use the library list. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following