Programming Considerations

When working with more than one location, we need to find a way to identify which DB2 holds the data we want to process. With application directed data, before executing the SQL, you identify to DB2 the location to which the SQL statement should be directed. This can be done either explicitly by coding a connect statement in the application or by relying on the CURRENT SERVER register. The value of the CURRENT SERVER register is initially determined by the BIND option CURRENT SERVER. If this was not specified, then CURRENT SERVER is set to blanks until you issue a CONNECT TO statement.

When a package is bound with DBPROTOCOL(DRDA) and you use a three part name, DB2 will issue the connect statement under the covers. ...

Get DB2® Universal Database™ for OS/390™ v7.1 Application Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.