IBM Books

Connectivity Supplement


Setting Up the Application Requester

DB2 for MVS/ESA implements the DRDA application requester support as an integral part of the DB2 for MVS/ESA Distributed Data Facility (DDF). DDF can be stopped independently from the local DB2 for MVS/ESA database management facilities, but it cannot run in the absence of the local DB2 for MVS/ESA database management support.

When DB2 for MVS/ESA acts as an Application Requester, it can connect applications running on the system to remote DB2 Universal Database, DB2 for MVS/ESA, DB2 Universal Database for OS/390, DB2 Universal Database for AS/400, and DB2 for VSE & VM database servers that implement DRDA Application Server function.

For the DB2 for MVS/ESA Application Requester to provide distributed database access, you need to do the following:

Provide Network Information

Much of the processing in a distributed database environment requires exchanging messages with other locations in your network. For this processing to be performed correctly, you need to do the following:

  1. Define the local system

  2. Define the remote systems

  3. Define the communications

  4. Set RU sizes and pacing

Defining the Local System

Each program in the network is assigned a NETID and an LU name, so your DB2 for MVS/ESA Application Requester must have a NETID.LUNAME value when it connects to the network. Because the DB2 for MVS/ESA Application Requester is integrated into the local DB2 for MVS/ESA database management system, the Application Requester must also have an RDB_NAME. In the DB2 for MVS/ESA publications, DB2 for MVS/ESA refers to the RDB_NAME as a location name.

Define the DB2 for MVS/ESA Application Requester to the SNA network as follows:

  1. Select an LU name for your DB2 for MVS/ESA system. The NETID for your DB2 for MVS/ESA system is automatically obtained from VTAM when DDF starts.

  2. Define the LU name and location name in the DB2 for MVS/ESA bootstrap data set (BSDS). (DB2 for MVS/ESA restricts the location to 16 characters.)

  3. Create a VTAM APPL definition to register the selected LU name with VTAM.

Configuring the DDF BSDS  DB2 for MVS/ESA reads the BSDS during startup processing to obtain system installation parameters. One of the records stored in the BSDS is called the DDF record, because it contains the information used by DDF to connect to VTAM. This information consists of the following:

You can supply the DDF BSDS information to DB2 for MVS/ESA in two ways:

When DDF is started (either automatically at DB2 for MVS/ESA startup or by the DB2 for MVS/ESA START DDF command), it connects to VTAM, passing the LU name and password to VTAM. VTAM recognizes the DB2 for MVS/ESA system by checking the LU name and password (if a VTAM password is required) with the values defined in the DB2 for MVS/ESA VTAM APPL statement. The VTAM password is used to verify that DB2 for MVS/ESA is authorized to use the specified LU name on the VTAM system. The VTAM password is not transmitted through the network, and it is not used to connect other systems in the network to DB2 for MVS/ESA.

If VTAM does not require a password, omit the PASSWORD= keyword on the change log inventory utility. The absence of the keyword indicates that no VTAM password is required.

Creating a VTAM APPL definition  After you define the VTAM LU name and password to DB2 for MVS/ESA, you need to register these values with VTAM. VTAM uses the APPL statement to define local LU names. Figure 5 shows how to define the LU name LUDBD1 to VTAM.

Figure 5. Sample DB2 for MVS/ESA APPL Definition

 DB2APPLS VBUILD TYPE=APPL
 *
 *--------------------------------------------------------------------*
 *                                                                    *
 *           APPL DEFINITION FOR THE SYDNEY DB2 SYSTEM                *
 *                                                                    *
 *--------------------------------------------------------------------*
 *
 LUDBD1   APPL  APPC=YES,                                               X
                AUTH=(ACQ),                                             X
                AUTOSES=1,                                              X
                DMINWNL=10,                                             X
                DMINWNR=10,                                             X
                DSESLIM=20,                                             X
                EAS=9999,                                               X
                MODETAB=RDBMODES,                                       X
                PRTCT=PSWDBD1,                                          X
                SECACPT=ALREADYV,                                       X
                SRBEXIT=YES,                                            X
                VERIFY=NONE,                                            X
                VPACING=2,                                              X
                SYNCLVL=SYNCPT,                                         X
                ATNLOSS=ALL                                             X

Many keywords are available on the VTAM APPL statement. The meaning of the keywords is discussed in detail in the DB2 Administration Guide. The only keywords discussed here address topics in this book. The keywords of interest in Figure 5 are described as follows:

LUDBD1
VTAM uses the APPL statement label as the LU name. In this case, the LU name is LUDBD1. The APPL syntax does not allow room for a complete NETID.LUNAME value. The NETID value is not specified on the VTAM APPL statement, because all VTAM applications are automatically assigned the NETID for the VTAM system.

AUTOSES=1
The number of SNA contention winner sessions that start automatically when an APPC Change Number of Sessions (CNOS) request is issued. A nonzero value must be supplied with AUTOSES to inform DB2 for MVS/ESA in all cases when VTAM CNOS processing fails.

You do not have to automatically start all the APPC sessions between any two distributed database partners. If the AUTOSES value is less than the contention winner limit (DMINWNL), VTAM delays starting the remaining SNA sessions until they are required by a distributed database application.

DMINWNL=10
The number of sessions on which this DB2 for MVS/ESA system is the contention winner. The DMINWNL parameter is the default for CNOS processing, but can be overridden for any given partner by adding a row to the SYSIBM.SYSLUMODES table in the DB2 for MVS/ESA communications database.

DMINWNR=10
The number of sessions on which the partner system is the contention winner. The DMINWNR parameter is the default for CNOS processing, but can be overridden for any given partner by adding a row to the SYSIBM.SYSLUMODES table in the DB2 for MVS/ESA communications database.

DSESLIM=20
The total number of sessions (winner and loser sessions) you can establish between DB2 for MVS/ESA and another distributed system for a specific mode group name. The DSESLIM parameter is the default for CNOS processing, but can be overridden for any given partner by adding a row to the SYSIBM.SYSLUMODES table in the DB2 for MVS/ESA communications database.

If the partner cannot support the number of sessions requested on the DSESLIM, DMINWNL, or DMINWNR parameters, the CNOS process negotiates new values for these parameters that are acceptable to the partner.

EAS=9999
An estimate of the total number of sessions that this VTAM LU requires.

MODETAB=RDBMODES
Identifies the VTAM MODE table where each DB2 for MVS/ESA mode name exists.

PRTCT=PSWDBD1
Identifies the VTAM password to use when DB2 for MVS/ESA attempts to connect to VTAM. If the PRTCT keyword is omitted, no password is required, and you should omit the password= keyword from the DB2 for MVS/ESA change log inventory utility.

SECACPT=ALREADYV
Identifies the highest SNA conversation-level security value accepted by this DB2 for MVS/ESA system when it receives a distributed database request from a remote system. The ALREADYV keyword indicates this DB2 for MVS/ESA system can accept three SNA session security options from other DRDA systems that request data from this DB2 for MVS/ESA system:

It is best to always specify SECACPT=ALREADYV, because the SNA conversation security level for each DB2 for MVS/ESA partner is taken from the DB2 for MVS/ESA communications database (the USERSECURITY column of the SYSIBM.SYSLUNAMES table). SECACPT=ALREADYV gives you the most flexibility in selecting values for USERSECURITY.

VERIFY=NONE
Identifies the level of SNA session security (partner LU verification) required by this DB2 for MVS/ESA system. The NONE value indicates that partner LU verification is not required.

DB2 for MVS/ESA does not restrict your choice for the VERIFY keyword. In a nontrusted network, VERIFY=REQUIRED is recommended. VERIFY=REQUIRED causes VTAM to reject partners that cannot perform partner LU verification. If you choose VERIFY=OPTIONAL, VTAM performs partner LU verification only for those partners that provide the support.

VPACING=2
Sets the VTAM pacing count to 2.

SYNCLVL=SYNCPT
Indicates that DB2 for MVS/ESA is able to support two-phase commit. VTAM uses this information to inform the partner that two-phase commit is available. If this keyword is present, DB2 for MVS/ESA automatically uses two-phase commit if the partner can support it.

ATNLOSS=ALL
Indicates that DB2 for MVS/ESA needs to be informed each time a VTAM session ends. This ensures that DB2 for MVS/ESA performs SNA resynchronization when required.

DSESLIM, DMINWNL, and DMINWNR allow you to establish default VTAM session limits for all partners. For partners that have special session limit requirements, the SYSIBM.SYSLUMODES table can be used to override the default session limits. For example, you might want to specify VTAM default session limits that are appropriate for your OS/2 systems. For other partners, you can create rows in the SYSIBM.SYSLUMODES table to define the desired session limits. Consider these sample values:

DSESLIM=4,DMINWNL=0,DMINWNR=4

These parameters allow each partner to create up to four sessions with DB2 for MVS/ESA, where the partner is the contention winner on each of the sessions. Because OS/2 creates the LU 6.2 conversations with DB2 for MVS/ESA, by making OS/2 the contention winner on the sessions, you gain a small performance advantage. If OS/2 has an available contention winner session, it does not have to ask for permission to start a new LU 6.2 conversation.

Defining the Remote Systems

When a DB2 for MVS/ESA application requests data from a remote system, DB2 for MVS/ESA searches the communications database tables to find information about the remote system, including a search on:

The communications database is a group of SQL tables managed by the DB2 for MVS/ESA system administrator. As the DB2 for MVS/ESA system administrator, you must use SQL to insert rows in the communications database to describe each potential DRDA partner. The communications database consists of five tables:

  1. SYSIBM.SYSLOCATIONS

    This table allows DB2 for MVS/ESA to determine the LU name and TPN value for each RDB_NAME selected by a DB2 for MVS/ESA application. The columns are:

    LOCATION
    The RDB_NAME of the remote system. DB2 for MVS/ESA limits the RDB_NAME value to 16 bytes, which is two bytes shorter than the 18-byte limit defined in DRDA.

    LOCTYPE
    Currently not used; it must be blank.

    LINKNAME
    The LU name of the remote system.

    LINKATTR
    The TPN of the remote system. If the remote system is a DB2 for MVS/ESA system or the remote system uses the default DRDA TPN value (X'07F6C4C2' 1 ), an empty string can be used to specify the TPN because DB2 for MVS/ESA automatically chooses the correct value.

    If the remote system requires a TPN value other than the default TPN value, you must supply this value here.

  2. SYSIBM.SYSLUNAMES

    This table defines the network attributes of the remote systems. The columns are:

    LUNAME
    The LU name of the remote system.

    SYSMODENAME
    The VTAM logon mode name used to establish the DB2 for MVS/ESA-to-DB2 for MVS/ESA intersystem conversations for the DB2 for MVS/ESA secondary server support (system-directed access). A blank value in this column indicates IBMDB2LM should be used for DB2 for MVS/ESA system conversations.

    USERSECURITY
    The network security acceptance options required of the remote system when this DB2 for MVS/ESA system acts as a server for the remote system (inbound security requirements).

    ENCRYPTPSWDS
    Whether passwords exchanged with this partner are encrypted. Encrypted passwords are only supported by DB2 for MVS/ESA requesters and servers.

    MODESELECT
    Determines whether the SYSIBM.SYSMODESELECT table is used to select a VTAM logon mode entry (mode name) based on the end user and application making the request. If this column contains a 'Y', the SYSIBM.SYSMODESELECT table is used to obtain the mode name for each outbound distributed database request.

    If MODESELECT contains anything other than a 'Y', the mode name IBMDB2LM is used for system-directed access requests, and the mode name IBMRDB is used for DRDA requests.

    The MODESELECT column allows you to prioritize distributed database requests by specifying a VTAM class of service (COS) associated with the mode name.

    USERNAMES
    The level of come-from checking and user ID translation required. This column also specifies the security parameters this DB2 for MVS/ESA subsystem uses when requesting data from the remote partner (outbound security requirements). usernames can have the value I, O, or B.

  3. SYSIBM.SYSLUMODES

    This table is used to define LU 6.2 session limits (CNOS limits) for each partner system. The columns are:

    LUNAME
    The LU name of the remote system.

    MODENAME
    The name of the VTAM logon mode whose limits are being specified. A blank value in the MODENAME column defaults to IBMDB2LM.

    CONVLIMIT
    The maximum number of active conversations between the local DB2 for MVS/ESA and the remote system for this logon mode. This value is used to override the DSESLIM parameter in the VTAM APPL definition statement for this logon mode, which supplies the default VTAM session limits for DB2 for MVS/ESA.

    The value selected in CONVLIMIT is used during CNOS to set the DMINWNR and DMINWNL values to CONVLIMIT/2.

    AUTO
    Whether CNOS processing and preallocation of sessions are initiated automatically at DDF startup or deferred until the first reference to the LU name via this logon mode.

  4. SYSIBM.SYSMODESELECT

    This table allows you to specify different mode names for individual end users and DB2 for MVS/ESA applications. Because each VTAM mode name can have an associated class of service (COS), you can use this table to assign network transmission priorities to distributed database applications based on a combination of AUTHID, PLANNAME, and LUNAME. The columns are:

    AUTHID
    The DB2 for MVS/ESA user's authorization ID (user ID). The default is blank, indicating the specified logon mode name applies to all authorization IDs.

    PLANNAME
    The plan name associated with the application requesting access to a remote database system. The default is blank, indicating that the specified logon mode name applies to all plan names. The plan name used for the BIND PACKAGE command is DSNBIND.

    LUNAME
    The LU name associated with the remote database system.

    MODENAME
    The name of the VTAM logon mode to use when routing a distributed database request to the indicated remote system. The default is blank, indicating that IBMDB2LM should be used for system-directed access conversations and IBMRDB should be used for DRDA conversations.

  5. SYSIBM.SYSUSERNAMES

    This table is used to manage end user names by providing passwords, name translations, and come-from checking. DB2 for MVS/ESA refers to the end user's name as an authorization ID. Most other products refer to this name as a user ID.

    With this table, you can use name translation to force different values to be used for the SNA user ID and the DB2 for MVS/ESA authorization ID. The name translation process is allowed for requests to a remote system (outbound requests) and for requests coming from a remote system (inbound requests). If passwords are not encrypted, this table is the source of the end user's password when both user ID and password are sent to a remote site. The columns are:

    TYPE
    The description of how the row is to be used (whether it is a row describing name translations for outbound or inbound/come-from checking requests).

    AUTHID
    For outbound name translation, this is the DB2 for MVS/ESA authorization ID to translate. For inbound name translation, this is the SNA user ID to translate. In either case, a blank AUTHID value applies to all authorization IDs or user IDs.

    LUNAME
    The LU name of the remote system to which this row applies. If blank, the NEWAUTHID value applies to all systems.

    NEWAUTHID
    The new end user name (either SNA user ID or DB2 for MVS/ESA authorization ID). Blank specifies that you do not need to translate the ID.

    PASSWORD
    The password used on the allocate conversation, if passwords are not encrypted (ENCRYPTPSWDS = 'N' in SYSIBM.SYSLUNAMES). If passwords are encrypted, this column is ignored.

Defining Communications

VTAM is the Communications Manager for MVS systems. VTAM accepts LU 6.2 verbs from DB2 for MVS/ESA and converts these verbs into LU 6.2 data streams you can transmit over the network. For VTAM to communicate with the partner applications defined in the DB2 for MVS/ESA communications database, you need to provide VTAM with the following information:

Setting RU Sizes and Pacing

The VTAM mode table entries you define specify RU sizes and pacing counts. Failure to define these values correctly can have a negative impact on all VTAM applications.

After choosing RU sizes, session limits, and pacing counts, it is extremely important to consider the impact these values can have on the existing VTAM network. You should review the following items when you install a new distributed database system:

Provide Security

When a remote system performs distributed database processing on behalf of an SQL application, it must be able to satisfy the security requirements of the Application Requester, the Application Server, and the network connecting them. These requirements fall into one or more of the following categories:

Selecting End User Names

On MVS systems, end users are assigned a 1 to 8-character user ID. This user ID value must be unique within a particular MVS system, but might not be unique throughout the SNA network. For example, there can be a user named JONES on the NEWYORK system, and another user named JONES on the DALLAS system. If these two users are the same person, no conflict exists. However, if the JONES in DALLAS is a different person than the JONES in NEWYORK, the SNA network (and consequently the distributed database systems within that network) cannot distinguish between JONES in NEWYORK and JONES in DALLAS. If you do not correct this situation, JONES in DALLAS can use the privileges granted to JONES at the NEWYORK system.

To eliminate naming conflicts, DB2 for MVS/ESA provides support for end user name translation. When an application at the DB2 for MVS/ESA Application Requester makes a distributed database request, DB2 for MVS/ESA performs name translation if the communications database specifies that outbound name translation is required. If outbound name translation is selected, DB2 for MVS/ESA always forces a password to be sent with each outbound distributed database request.

Outbound name translation in DB2 for MVS/ESA is activated by setting the USERNAMES column in the SYSIBM.SYSLUNAMES table to either 'O' or 'B'. If USERNAMES is set to 'O', end user name translation is performed for outbound requests. If USERNAMES is set to 'B', end user name translation is performed for both inbound and outbound requests.

Because DB2 for MVS/ESA authorization is dependent on both the end user's user ID and the user ID of the DB2 for MVS/ESA plan or package owner, the end user name translation process is performed for the end user's user ID, the plan owner's user ID, and the package owner's user ID. 2 The name translation process searches the SYSIBM.SYSUSERNAMES table in the following sequence to find a row that matches one of the following patterns (TYPE.AUTHID.LUNAME):

  1. O.AUTHID.LUNAME--A translation rule for a specific end user to a specific partner system.

  2. O.AUTHID.blank--A translation rule for a specific end user to any partner system.

  3. O.blank.LUNAME--A translation rule for any user to a specific partner system.

If no matching row is found, DB2 for MVS/ESA rejects the distributed database request. If a row is found, the value in the NEWAUTHID column is used as the authorization ID. (A blank NEWAUTHID value indicates the original name is used without translation.)

Consider the example discussed earlier. You want to give JONES in NEWYORK a different name (NYJONES) when JONES makes distributed database requests to DALLAS. In the example, assume that the application used by JONES is owned by DSNPLAN (the DB2 for MVS/ESA plan owner), and you do not need to translate this user ID when it is sent to DALLAS. The SQL statements required to supply the name translation rules in the communications database are shown in Figure 6.

Figure 6. SQL for Outbound Name Translation

INSERT INTO SYSIBM.SYSLUNAMES
     (LUNAME, SYSMODENAME, USERSECURITY, ENCRYPTPSWDS, MODESELECT, USERNAMES)
  VALUES ('LUDALLAS', ' ', 'A', 'N', 'N', 'O');
INSERT INTO SYSIBM.SYSLOCATIONS
     (LOCATION, LOCTYPE, LINKNAME, LINKATTR)
  VALUES ('DALLAS', ' ', 'LUDALLAS', '');
INSERT INTO SYSIBM.SYSUSERNAMES
     (TYPE, AUTHID, LUNAME, NEWAUTHID, PASSWORD)
  VALUES ('O', 'JONES', 'LUDALLAS', 'NYJONES', 'JONESPWD');
INSERT INTO SYSIBM.SYSUSERNAMES
     (TYPE, AUTHID, LUNAME, NEWAUTHID, PASSWORD)
  VALUES ('O', 'DSNPLAN', 'LUDALLAS', ' ', 'PLANPWD');

The resulting communications database tables are shown in Figure 7:

Figure 7. Outbound Name Translation

                                                                                  
                                                                                 
 

REQTEXT

Network Security

After the Application Requester selects the end user names to represent the remote application, the Application Requester must provide the required LU 6.2 network security information. LU 6.2 provides three major network security features:

Because the Application Server is responsible for managing the database resources, the Application Server dictates which network security features are required of the Application Requester. You must record the conversation-level security requirements of each Application Server in the SYSIBM.SYSLUNAMES table by setting the USERNAMES column of the SYSIBM.SYSLUNAMES table to reflect the application server's requirement.

The possible SNA conversation security options are:

SECURITY=SAME
This is also known as already-verified security because only the end user's user ID is sent to the remote system (no password is transmitted). Use this level of conversation security when the USERNAMES column in SYSIBM.SYSLUNAMES does not contain 'O' or 'B'.

Because DB2 for MVS/ESA ties end user name translation to outbound conversation security, it does not allow you to use SECURITY=SAME when outbound end user name translation is activated.

SECURITY=PGM
This causes the end user's ID and password to be sent to the remote system for validation. Use this security option when the USERNAMES column of the SYSIBM.SYSLUNAMES table contains either an 'O' or 'B'.

Depending upon options specified in the SYSIBM.SYSLUNAMES table, DB2 for MVS/ESA obtains the end user's password from two different sources:

SECURITY=NONE
This option is not supported by DRDA, so DB2 for MVS/ESA has no provision for this security option.

Database Manager Security

One way the Application Requester can participate in distributed database security is through outbound name translation, as stated earlier in Selecting End User Names. You can use outbound name translation to control access to each Application Server, based on the identity of the end user making the request and the application making the request. Other ways the DB2 for MVS/ESA Application Requester contributes to the distributed system security are:

Binding remote applications
End users bind remote applications at the Application Server with the DB2 for MVS/ESA BIND PACKAGE command. DB2 for MVS/ESA does not restrict the use of the BIND PACKAGE command at the requester. However, an end user cannot use a remote package until the package is included in a DB2 for MVS/ESA plan. DB2 for MVS/ESA does restrict the use of the BIND PLAN command. An end user cannot add the remote package to a plan unless the end user is given either the BIND or BINDADD privilege with the DB2 for MVS/ESA GRANT statement.

When you bind a package, use the ENABLE/DISABLE option to specify whether the package is to be used by TSO, CICS/ESA, IMS/ESA, or a remote DB2 for MVS/ESA subsystem.

Executing remote applications
For the DB2 for MVS/ESA end user to run a remote application, the end user must have authority to run the DB2 for MVS/ESA plan associated with that application. The DB2 for MVS/ESA plan owner automatically has authority to run the plan. Other end users can be given authority to run the plan with the DB2 for MVS/ESA GRANT EXECUTE statement. In this way, the owner of a distributed database application can control use of the application on a user-by-user basis.

Security Subsystem

The external security subsystem on MVS systems is provided by RACF and other products that provide an interface compatible with RACF. The DB2 for MVS/ESA Application Requester does not have any direct calls to the external security subsystem, with the exception of the encrypted password support described in Network Security. However, the external security subsystem is used indirectly at the Application Requester in the following situations:

Represent Data

DB2 for MVS/ESA is shipped with a default installation coded character set identifier (CCSID) of 500. This default is probably not correct for your installation.

When installing DB2 for MVS/ESA, you must set the installation CCSID to the CCSID of the characters generated and sent to DB2 for MVS/ESA by the input devices at your site. This CCSID is generally determined by the national language you use. If the installation CCSID is not correct, character conversion will produce incorrect results. See DB2 Connect User's Guide for a list of the supported CCSIDs for each country or national language.

You must ensure that your DB2 for MVS/ESA subsystem has the ability to convert from each application server's CCSID to your DB2 for MVS/ESA subsystem's installation CCSID. DB2 for MVS/ESA provides conversion tables for the most common combinations of source and target CCSIDs, but not for every possible combination. You can add to the set of available conversion tables and conversion routines if you need to. See the DB2 Administration Guide, for more information about DB2 for MVS/ESA character conversion.


Footnotes:

1
This TPN value currently applies to DB2 for VM.

2
If the request is being sent to a DB2 for MVS/ESA server, name translation is also performed for the package owner and plan owner. Package and plan owner names never have passwords associated with them.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]