IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how can a bind a program having tables in diff'nt subystem


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gireeshsk

New User


Joined: 20 Dec 2005
Posts: 6
Location: chennai

PostPosted: Thu May 18, 2006 12:42 pm
Reply with quote

Hi

I have a program accessing two tables which are in two different subsystem. is it possible and if yes how can i bind it?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Sat May 20, 2006 5:24 am
Reply with quote

gireeshsk,

We can dream of a better world, but alas, I do not think this is possible. icon_cry.gif

Dave
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Tue May 23, 2006 3:03 pm
Reply with quote

Hi,
If you want to access tables on more than one subsyatem in single program you should have DRDA setup.so that you can create remote aliases on the tables which are not on current subsystem.
It will allow you to access those tables from current subsystem.

and you need to use the alias names in the program not table names.

After bind, you can execute the program which will use the remote alias to access the tables on other subsystem.

Hope you got me.


Regards
Rags
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Tue May 23, 2006 3:27 pm
Reply with quote

Sorry to disappoint you, this cannot be achieved even by using aliases.

A bind creates access path and by specifying alias names we are trying to create access paths of 1 subsystem on to 2nd which is not allowed.
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Tue May 23, 2006 5:48 pm
Reply with quote

Gurmeet,
I didn't understand your concern...But practically this is the only option people use for accessing the tables from different subsystems.

DRDA setup will allow you to query the table on remote system through alias on current system.You will not get problems with bind.

Regards
Rags
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Tue May 23, 2006 6:37 pm
Reply with quote

Rags,

I have a similar setup, the bind doesn't works, it fails with sqlcode -512.

When I try to access table from 1 subsystem only, it works but accessing multiple subsytem tables in the same query doesn't work.

Please advise if the above is possible.

~Gurmeet
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Wed May 24, 2006 10:48 am
Reply with quote

Gurmeet,
there are some restictions while using remote system tables...
1.we should not give EXPLAIN(YES) while binding...
2.we should not use the remote alias in the join queries

If we query the alias directly in the program, I guess Bind will not fail.
In my project we use like that only.

Better have a look at some DB2 manual for more info about using remote aliases.

Regards
Rags
Back to top
View user's profile Send private message
Gurmeet

New User


Joined: 22 Feb 2006
Posts: 46
Location: Pune

PostPosted: Wed May 24, 2006 2:39 pm
Reply with quote

Thanks Rags

Actually, in one of the scenarios we tried using aliases in join queries hence it might have failed.

Thanks for the clarification, it helped me a lot solving a long pending issue.


~Gurmeet
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top