Page 1 of 1

Accessing a table of other db2 system

PostPosted: Tue Sep 06, 2011 3:21 pm
by gopal_NKP
Hi,

One of the program in my application has the following scenario.

1. I am doing testing in db2 systm DB21. The program in DB21 has an alias of a table, which of another system DB22.

We have done bind successfully. but even though we are getting the sql code -805. plant not found in db22.programname. (this program is subprogram called by the main program). We are using dynamic call of sub programs. All the subprograms and main program is bind in the db2system DB21.

Please help me.
thanks
vgl

Re: Accessing a table of other db2 system

PostPosted: Tue Sep 06, 2011 5:23 pm
by GuyC
I think (I'm not sure about aliasses) but DRDA-protocol requires package to be available in both subsystems

Re: Accessing a table of other db2 system

PostPosted: Wed Sep 07, 2011 2:00 pm
by gopal_NKP
Hi,

thanks for your response.

The environment is as follows.

IN DB2SYS DB21:
one main program mainpgm1 and many sub programs with plan COBPLN1.
ALIAS : EXTABLE POINTS TO ACTTABLE IN DB2SYS DB22.
subpgm4 is the sub program with select query on alias EXTABLE.
IN DB2SYS DB22:
TABLE : ACTTABLE

DB2SYS DB21:
We have one cobol program (PLAN COBPGM1) which calls number of sub programs. One (subpgm4) of the sub programs, performs a select query on alias EXTABLE

The program mainpgm1 is getting abended with the following message.

 
DSNT408I SQLCODE = -805, ERROR:  DBRM OR PACKAGE NAME DB22..subpgm4.1-
          90A022211956B4C NOT FOUND IN PLAN ROSPA120. REASON 01         
 DSNT418I SQLSTATE   = 51002 SQLSTATE RETURN CODE                       
 DSNT415I SQLERRP    = DSNXEPM SQL PROCEDURE DETECTING ERROR             
 DSNT416I SQLERRD    = -350  0  0  -1  0  0 SQL DIAGNOSTIC INFORMATION   
 DSNT416I SQLERRD    = X'FFFFFEA2'  X'00000000'  X'00000000'             
          X'FFFFFFFF'  X'00000000'  X'00000000' SQL DIAGNOSTIC           
          INFORMATION                                                   
 


Please help me.