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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.