DB2 Again .. Solution Maybe... (Brian Stephens)
krikor Gullekian
krigul at yahoo.com
Fri Jul 12 12:47:34 CDT 2013
________________________________
Brian,
Have you tried to access the DB with a tool other than Powerhouse using the same ODBC settings?
KG
----------------------------------------------------------------------
Message: 1
Date: Wed, 10 Jul 2013 11:03:09 -0400
From: Brian Stephens <bws001 at gmail.com>
Subject: DB2 one more time..
To: powerh-l at lists.sowder.com
Message-ID:
<CAPxvv-XLxJNxT4KfPNULaZBziqRN3HW-ib_FG11-0NLPN0E0wg at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I am still trying to get PH on windows to talk to DB2 on ISeries thru OBDC..
Everything we have read says that we should be able the set the ODBC driver to access a default schema..
However is appears that PH requires it to be fully qualified..
Using the sample database in QSHOW
I see
> show records in sample
2013/07/10 TEST ODBC Connection Page 1
R E C O R D S U M M A R Y
For DICTIONARY: C:\TEST.pdc
Record Name File Name/ Record Size
Open Name (bytes)
SAMPLE.DEPT SAMPLE 66
DSN=SAMPLE;
SAMPLE.EMP SAMPLE 79
DSN=SAMPLE;
SAMPLE.EMP_ACT SAMPLE 25
DSN=SAMPLE;
SAMPLE.EMPACT SAMPLE 25
DSN=SAMPLE;
SAMPLE.PROJ SAMPLE 58
DSN=SAMPLE;
SAMPLE.ACT SAMPLE 30
DSN=SAMPLE;
SAMPLE.CL_SCHED SAMPLE 17
DSN=SAMPLE;
SAMPLE.DEPARTMENT SAMPLE 66
DSN=SAMPLE;
SAMPLE.EMP_PHOTO SAMPLE 1080
DSN=SAMPLE;
I have set the default schema in OBDC to SAMPLE.. So i should be able to find it without it...
But if I try to access the table unqualified I get
> access emp in sample
> rep all
> go
*E* Data access error. (EMP)
*E* DMS-E-GENERAL, A general exception has occurred during operation 'prepare request'. (EMP)
*E* DMS-E-RBI_TABLE, The table or view EMP was not found in the dictionary.
(EMP)
Records selected: 0
What's more bizarre is that if I show items.. Powerhouse has indeed found the records..
> show items
INPUT OUTPUT
EMP TYPE SCALE SCALE DEC PICTURE
* EMPNO CHAR X(6)
FIRSTNME VARCHAR X(12)
MIDINIT CHAR X(1)
LASTNAME VARCHAR X(15)
* WORKDEPT CHAR X(3)
PHONENO CHAR X(4)
HIREDATE DATE YYYY/MM/DD
JOB CHAR X(8)
EDLEVEL NUM 0 0 0 ^^,^^^
SEX CHAR X(1)
BIRTHDATE DATE YYYY/MM/DD
SALARY NUM 2 0 2 ^,^^^,^^^.^^
BONUS NUM 2 0 2 ^,^^^,^^^.^^
COMM NUM 2 0 2 ^,^^^,^^^.^^
Does powerhouse not take into account the ODBC setting???
Has anyone else ever done this and gotten it to work..
It's saying that EMP is not in the dictionary does that mean I could add it to the PDL? How would I.. Refines is a big issue with this project.
Fully qualifying sorta takes away the benefit of being able to pass variables to the open name..
PS It does work fully qualified...
> access sample.emp in sample
> rep all
> go
2013/07/10 TRUEOIL TEST ODBC Conection
PAGE 1
Empno Firstnme Midinit Lastname Workdept Phoneno
Hiredate
Job Edlevel Sex Birthdate Salary Bonus
Comm
000010 CHRISTINE I HAAS A00 3978
1965/01/01
PRES 18 F 1933/08/24 52,750.00 1,000.00
4,220.00
000020 MICHAEL L THOMPSON B01 3476
1973/10/10
MANAGER 18 M 1948/02/02 41,250.00 800.00
3,300.00
000030 SALLY A KWAN C01 4738
1975/04/05
MANAGER 20 F 1941/05/11 38,250.00 800.00
3,060.00
000050 JOHN B GEYER E01 6789
1949/08/17
MANAGER 16 M 1925/09/15 40,175.00 800.00
3,214.00
000060 IRVING F STERN D11 6423
1973/09/14
MANAGER 16 M 1945/07/07 32,250.00 500.00
2,580.00
--
Thanks
Brian Stephens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20130710/ecaed911/attachment-0001.htm>
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20130712/53489181/attachment-0001.htm>
More information about the powerh-l
mailing list