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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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