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

Start of changeSuppose 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.End of change

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

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 the COPY option to create a copy of the local package at the remote site.

    Start of changeThe OPTIONS bind option is required when you specify the COPY option. The OPTIONS option controls the option values for bind options that you do not specify. See OPTIONS bind option for more information about the OPTIONS option.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

Start of changeSuppose 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.End of change

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