Start of change

Bind process for remote access

You can use several different bind processes to enable access to data at a remote server.

These processes work when the remote server is a Db2 for z/OS® system or another type of database system that uses DRDA access.

Bind a package at the local site and the remote site

If you have not yet bound a local package, use this technique.

  1. Bind the DBRM into a package at the local site.
  2. Bind the DBRM into a package at the remote site.
  3. Bind a plan with a package list that includes the local package and the remote package.

Example: Bind a package at the local site and the remote site

Suppose that you precompiled program MYPROG to generate DBRM MYPROG, and compiled and link-edited program MYPROG. You want to run MYPROG to access tables at site CHICAGO from your local site. Use commands like these to bind local and remote packages and a plan. The number at the end of each line corresponds to a previously described step.

BIND PACKAGE(LOCALCOLLID) MEMBER(MYPROG) other bind options            
BIND PACKAGE (CHICAGO.REMOTECOLLID) MEMBER(MYPROG) other bind options  
BIND PLAN (MYPLAN) PKLIST(LOCALCOLLID.* ,*.REMOTECOLLID.*)             

Bind a copy of an existing local package at the remote site

If you have already bound a local package, you can use this technique.

  1. Issue the BIND command with COPY and OPTIONS to create a copy of the local package at the remote site.

    Start of changeOPTIONS controls the option values for bind options that you do not specify.End of change

  2. Bind a plan with a package list that includes the local package and the remote package.

Example: Bind a copy of an existing local package at the remote site

Suppose that you previously prepared program MYPROG for execution at the local site. As part of program preparation, you bound package LOCALCOLLID.MYPROG at the local site. Now you want to run MYPROG to access tables at site CHICAGO from your local site. Use commands like these to bind a copy of the local package at site CHICAGO, and then bind a plan. The number at the end of each line corresponds to a previously described step.


BIND PACKAGE(CHICAGO.REMOTECOLLID) COPY(LOCALCOLLID.MYPROG) - 
 OPTIONS(COMPOSITE|COMMAND) - 
 other bind options                                                            
BIND PLAN (MYPLAN) PKLIST(LOCALCOLLID.* ,*.REMOTECOLLID.*)                     
End of change