IBM Books

Connectivity Supplement


Setting Up the Application Requester

The AS/400 system implements the DRDA application requester support as an integral part of the OS/400 operating system. Because application requester support is part of the OS/400 operating system, it is active whenever the operating system is active. This is also true of the application server support in DB2 Universal Database for AS/400.

When DB2 Universal Database for AS/400 acts as an application requester, it can connect to any application server that supports DRDA. For the DB2 Universal Database for AS/400 application requester to provide distributed database access, you need to consider the following:

Provide Network Information

The Application Requester must be able to accept a relational database name and translate it into network parameters. The AS/400 system uses the relational database directory to register relational database names and their corresponding network parameters. This directory allows the AS/400 application requester to pass the required network information to establish communications in a distributed database network.

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

Define the local system to DB2 Universal Database for AS/400

Define the remote system to DB2 Universal Database for AS/400

Define communications to DB2 Universal Database for AS/400

Defining the Local System to DB2 Universal Database for AS/400

Each application requester in the distributed database network must have an entry in its Relational Database Directory for its local relational database and one for each remote relational database the application requester accesses. Any AS/400 system in the distributed database network that acts only as an application server must have an entry in its relational database directory for the local relational database. For more information about the relational database directory, see AS/400 Distributed Database Programming.

To define the local system, name the local database by adding an entry with a remote location name of *LOCAL to the relational database directory. To do this, use the Add Relational Database Directory Entry (ADDRDBDIRE) command. The following example shows the ADDRDBDIRE command, where the name of the application requester's database is ROCHESTERDB:

   ADDRDBDIRE RDB(ROCHESTERDB) RMTLOCNAME(*LOCAL)

For more detail on relational database directory commands, see AS/400 Distributed Database Programming.
Note:In the latest versions of OS/400, the local RDB name entry be created automatically if it does not already exist when it is required. The system name in the network attributes will be used as the local RDB name.

Defining the Remote System to DB2 Universal Database for AS/400

Each application server in the distributed DB network must also have a local entry in its RDB directory. In addition, an entry for each remote database must be present in the RDB directory of each application requester. To create these:

For TCP/IP connections (supported in DB2 Universal Database for AS/400 Version 4.2), only the remote database name and associated IP address and port are required. See Connecting DB2 Universal Database for AS/400 in a DRDA Network Using TCP/IP.

Defining SNA Communications

This section describes configuring communications on the AS/400 system using Advanced Peer-to-Peer Networking (APPN). The AS/400 system also allows advanced program-to-program communications (APPC) configurations, which do not provide network routing support. An AS/400 distributed database works with either configuration. For more information about APPC configurations, see OS/400 Communications Configuration.

AnyNet Support on the AS/400 allows APPC applications to run over Transmission Control Protocol/Internet Protocol (TCP/IP) networks. Examples in the sections that follow include DDM, Systems Network Architecture Distribution Services, Alerts, and 5250 Display Station Pass-Through. These applications, along with DRDA, can run unchanged over TCP/IP networks with some additional configuration. To specify AnyNet support, you specify *ANYNW on the LINKTYPE parameter of the CRTCTLAPPC command.

For more information on APPC over TCP/IP, refer to OS/400 Communications Configuration and OS/400 TCP/IP Configuration and Reference. (Note that native TCP/IP support for DRDA communications is provided in DB2 Universal Database for AS/400 Version 4.2. See Connecting DB2 Universal Database for AS/400 in a DRDA Network Using TCP/IP.)

APPN provides networking support that allows the AS/400 system to participate in and control a network of systems without requiring the networking support traditionally provided by a mainframe system. The following steps tell you how to configure an AS/400 system for APPN support.

  1. Define the network attributes using the Change Network Attributes (CHGNETA) command.

    The network attributes contain:

  2. Create the line description.

    The line description describes the physical line connection and the data link protocol to be used between the AS/400 system and the network. Use the following commands to create line descriptions:

  3. Create controller descriptions.

    The controller description describes the adjacent systems in the network. Indicate the use of APPN support by specifying APPN(*YES) when creating the controller description. Use the following commands to create controller descriptions:

    If the AUTOCRTCTL parameter on a token-ring or Ethernet line description is set to *YES, then a controller description is automatically created when the system receives a session start request over the token-ring or Ethernet line.

  4. Create a class-of-service description.

    Use class-of-service description to select the communication routes (transmission groups) and give transmission priority. Five class-of-service descriptions are supplied by the system:

    #CONNECT
    The default class of service.

    #BATCH
    A class of service for batch jobs.

    #BATCHSC
    The same as #BATCH except a data link security of at least a packet-switched network is required. In packet-switched networks, data does not always follow the same path through the network.

    #INTER
    A class of service tailored for interactive communications.

    #INTERSC
    The same as #INTER except a data link security of at least a packet-switched network is required.

    Create other class-of-service descriptions using the Create Class-of-Service (CRTCOSD) command.

  5. Create a mode description.

    The mode description gives the session characteristics and number of sessions that can be used to negotiate the allowed values between the local and remote location. The mode description also points to the class of service that is used for the conversation. Several predefined modes are shipped with the system:

    BLANK
    The default mode name specified in the network attributes when the system is shipped.

    #BATCH
    A mode tailored for batch jobs.

    #BATCHSC
    The same as #BATCH except the associated class-of-service description requires a data link security of at least a packet-switched network.

    #INTER
    A mode tailored for interactive communications.

    #INTERSC
    The same as #INTER except the associated class-of-service description requires a data link security of at least a packet-switched network.

    IBMRDB
    A mode tailored for DRDA communications.

    Other mode descriptions can be created using the Create Mode Description (CRTMODD) command.

  6. Create device descriptions.

    The device description provides the characteristics of the logical connection between the local and remote systems. You do not have to manually create device descriptions if the AS/400 system is running to a host system with APPN and as an independent logical unit (LU). The AS/400 system automatically creates the device description and attaches it to the appropriate controller description when the session is established. If the AS/400 system is a dependent LU, then you must manually create the device descriptions using the Create Device Description (CRTDEVAPPC) command. In the device description, specify APPN(*YES) to indicate that the APPN is being used.

  7. Create APPN location lists.

    If additional local locations (called LUs on other systems) or special characteristics of remote locations for APPN are required, then you need to create APPN location lists. The local location name is the control point name specified in the network attributes. If you need additional locations for the AS/400 system, an APPN local location list is required. An example of a special characteristic of a remote location is if the remote location is in a network other than the one the local location is in. If the conditions exist, an APPN remote location list is required. Create APPN location lists by using the Create Configuration List (CRTCFGL) command.

  8. Activate (vary on) communications.

    You can activate the communication descriptions by using the Vary Configuration (VRYCFG) command or the Work With Configuration Status (WRKCFGSTS) command. If the line descriptions are activated, then the appropriate controllers and devices attached to that line are also activated. The WRKCFGSTS command is also useful for viewing the status of each connection.

  9. RU sizes and pacing

    RU sizes and pacing are controlled by values specified in the mode description. When you create the mode description, defaults are provided for both RU size and pacing. The default values are an AS/400 estimate for most environments including a distributed database. If the default is taken for RU size, the AS/400 system estimates the best value to use. When the AS/400 system is communicating with another system that supports adaptive pacing, the pacing values specified are only a starting point. The pacing is adjusted by each system depending on the system's ability to handle the data sent to it. For systems that do not support adaptive pacing, the pacing values are negotiated at session start, and remain the same for the life of the session. For more information, see OS/400 Communications Configuration.

Notes:

  1. The controller description is equivalent to the IBM Network Control Program and Virtual Telecommunications Access Method (NCP/VTAM) physical unit (PU) macros.

  2. The device description is equivalent to the NCP/VTAM logical unit (LU) macro. The device description contains information similar to that stored in the Communications Manager/2 1.1 partner LU profile.

  3. The mode description is equivalent to the NCP/VTAM mode tables and the Communications Manager Transmission Service Mode profile.

For more information about configuring for networking support and working with location lists, see the OS/400 Communications Configuration and APPN Support. For examples showing use of CL commands to define system configurations, see AS/400 Distributed Database Programming.

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 categories that follow:

Selecting End User Names

On AS/400 systems, end users are assigned a 1- to 10-character user ID that is unique to that system, but not necessarily unique within the network. This user ID is the one passed to the remote system when the connection is being established between two databases. To avoid conflicts between user IDs on systems in the network, outbound name translation is often used to change the user ID to resolve the conflict before it is sent over the network. However, the AS/400 system does not provide any outbound name translation to resolve potential conflicts at the server. These conflicts must be resolved at the application server, unless you use the additional USER and USING clauses on the AS/400 SQL CONNECT statement. USER is a valid ID on the application server, and USING is the corresponding password for the user.

Network Security

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

Session-level security is provided through LU-to-LU verification. Each LU has a key that must match the key at the remote LU. You specify the key on the LOCPWD keyword on the CRTDEVAPPC command.

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. The AS/400 security administrator must verify the security requirements of each application server so they require no more than the AS/400 application requester supports.

The following are possible SNA conversation security options:

SECURITY=SAME
Also known as already-verified security. Only the user ID of an application user is sent to the remote system. No password is sent. Before the AS/400 Version 2 Release 2 Modification 0, this level of conversation security was the only level supported by an AS/400 application requester.

SECURITY=PGM
Causes both the user ID and the password of the application user to be sent to the remote system for validation. Before the AS/400 Version 2 Release 2 Modification 0, this security option was not supported by an AS/400 application requester.

SECURITY=NONE
Not supported when AS/400 is an application requester.

Database Manager Security

The AS/400 system does not have an external security subsystem. All security is handled through the OS/400 operating system as discussed in the following section, System Security.

System Security

The OS/400 operating system controls authorization to all objects on the system, including programs, packages, tables, views, and collections.

The application requester controls authorization to objects that reside on the application requester. The security for objects on the application server is controlled at the application server, on the basis of which user ID is sent from the application requester. The user ID sent to the application server is associated with the user of the AS/400 application requester or the user ID given in the USER clause of the AS/400 SQL CONNECT statement. For example, CONNECT TO rdbname USER userid USING password.

Security of objects can be managed using the object authority CL commands or with the SQL statements GRANT and REVOKE. The object CL authority commands include Grant Object Authority (GRTOBJAUT) and Revoke Object Authority (RVKOBJAUT). These commands work on any object on the system. The statements GRANT and REVOKE only work on SQL objects: tables, views, and packages. If you need to change authorization for other objects such as programs or collections, use the GRTOBJAUT and RVKOBJAUT commands.

Granting and Revoking Authority 

Enter the following command on an AS/400 system to grant *USE authority to user USER1 to program PGMA:

   GRTOBJAUT OBJ(PGMA) OBJTYPE(*PGM) USER(USER1) AUT(*USE)

The command to revoke the same authority:

   RVKOBJAUT OBJ(PGMA) OBJTYPE(*PGM) USER(USER1) AUT(*USE)

*PGM identifies the object type in this example as a program. *SQLPKG is used to operate on a package, *LIB is used for a collection, and *FILE is used for a table.

GRTOBJAUT and RVKOBJAUT can also be used to prevent users from creating programs and packages. When authority is revoked from any of the CRTSQLxxx commands (where xxx = RPG, C, CBL, FTN, or PLI) used to create programs, a user is not able to create programs. If authority is revoked to the CRTSQLPKG command, the user is not able to create packages from the application requester or on the application server.

For example, enter the following command on an AS/400 system to grant *USE authority to user USER1 to the CRTSQLPKG command:

   GRTOBJAUT OBJ(CRTSQLPKG) OBJTYPE(*CMD) USER(USER1) AUT(*USE)

This affects the execution of crtsqlpkg on the application requester. On the application server, this command allows the creation of packages.

The command to revoke the same authority is:

   RVKOBJAUT OBJ(CRTSQLPKG) OBJTYPE(*CMD) USER(USER1) AUT(*USE)

Applying Default Authorization 

When objects are created, they are given a default authorization. By default, the creator of a table, view, or program is given all authority on those objects. Also by default, the public is given the same authority on those objects as they (the public) have on the objects' library or collection.

For more information on system security see AS/400 Security - Reference.

Represent Data

Products supporting DRDA automatically perform any necessary conversions at the receiving system. For this to happen the application requester CCSID value must be a supported value for conversion by the receiving system.

On an application requester, you should be concerned with the CCSID associated with:


Footnotes:

4
"Location name" in OS/400 is synonymous with "LU name" in VTAM. "Remote location name" means "partner or remote LU name".


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

[ DB2 List of Books | Search the DB2 Books ]