Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: how can a bind a program having tables in diff'nt subystem
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    Post subject: Re: how can a bind a program having tables in diff'nt subyst
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    Post subject: Re: how can a bind a program having tables in diff'nt subyst
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    Post subject: Re: how can a bind a program having tables in diff'nt subyst
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    Post subject: Re: how can a bind a program having tables in diff'nt subyst
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    Post subject: Re: how can a bind a program having tables in diff'nt subyst
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    Post subject: Re: how can a bind a program having tables in diff'nt subyst
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    Post subject: Re: how can a bind a program having tables in diff'nt subyst
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts ERM-Diagram of SysIBM-Catalog-Tables Auryn DB2 2 Fri Feb 17, 2017 6:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us