z/OS setup

On z/OS, you must:
  1. Compile and link-edit the CICS COBOL DB2 server programs, using your organization's normal procedures. The DFH0ACTD and DFH0CSTD members of the SDFHSAMP library contain the source code of the server programs.

    Store the load modules in an application load library that is included in the CICS DD DFHRPL concatenation. (For information about storing load modules in application load libraries, see the CICS® System Definition Guide.)

  2. Define the DB2 data tables used by the sample, and populate the tables with data. The DFH$EDB2 text deck contains the necessary DB2 DDL statements and the supplied data.
    Before using DFH$EDB2, you must modify the following line to suit your system:
    CREATE STOGROUP EBSAMPSG VOLUMES(SYSDA,SYSDB) VCAT DSNxxxxx;
    Change DSNxxxxx to the name of your high-level integrated catalog facility (ICF) catalog identifier for user-defined VSAM data sets.

    Authority required: DB2 authority to create a database, storage group, tablespace, tables, and indices.

  3. Bind the DB2 tables to the COBOL server programs. The DFH$ESQL text deck contains the necessary DB2 DML statements.

    Authority required: DB2 authority to perform a BIND for this database.

    Note:
    1. This step statically binds the SQL statements in the server programs to DB2, so that they don't have to be dynamically bound at execution time, thus improving runtime performance.
    2. If you recompile one of the server programs subsequently and intend it to access DB2, each time you recompile you must:
      1. Re-bind the DB2 tables to the COBOL server programs.
      2. Refresh the copy of the server program on CICS by executing the following CICS command in the CICS region:
        CEMT SET PROG(program_name) NEW

        For example, if you change the DFH0CSTD program and recompile it, use CEMT SET PROG(DFH0CSTD) NEW. (DFH0CSTD is defined to the CICS region in the DFH$EJB2 resource definition group—see step 5.)

  4. Grant authority to the CICS user ID to access the DB2 plan, using your organization's normal procedures (for example, SPUFI). For information about granting authority to access a DB2 plan, see the CICS DB2® Guide.
  5. Define the programs and DB2 connections used by the sample to CICS. The CICS-supplied sample group, DFH$EJB2, contains resource definitions for the EJB “Bank Account” sample. You must change some of the attributes of these resource definitions to suit your own environment. To do this, use the CEDA transaction or the DFHCSDUP utility.
    1. Copy the sample group to a group of your own choosing. For example:
       CEDA COPY GROUP(DFH$EJB2) TO(mygroup)  
    2. Display group mygroup and change the attributes of the following definitions as shown:
      • On the DB2CONN definition, change the value of DB2ID to the ID of the DB2 subsystem on which you created the DB2 tables used by the sample.
      • The PROGRAM definitions do not need to be modified.
    3. Discard the definitions that you don't need from group mygroup.

      As well as DB2CONN and PROGRAM definitions, DFH$EJB2 also contains a CORBASERVER and a TCPIPSERVICE definition. However, these are for reference only. It is strongly recommended that you set up your EJB server, as described in Setting up an EJB server, before attempting to install the sample programs. If you do this, you don't need the CORBASERVER and TCPIPSERVICE definitions in DFH$EJB2 because you will already have created your own based on those supplied in resource group DFH$EJB. Discard them from group mygroup.

      If you do decide to use the CORBASERVER and TCPIPSERVICE definitions in DFH$EJB2, you must modify them as described in Actions required on CICS.

      If your CICS region uses program autoinstall, you don't need the PROGRAM definitions. Discard them from group mygroup.

      Note: There is no supplied REQUESTMODEL definition, because it's not necessary to install one. The sample uses the default transaction ID, CIRP.
    4. Add the resource group containing the modified resource definitions to the CICS CSD, and to the CICS startup group list. To do this, it is recommended that you use the CICS system definition utility program, DFHCSDUP. For information about using DFHCSDUP, see the CICS Operations and Utilities Guide.

      Authority required: RACF authority to install resource definitions into the CICS region.

  6. If you have not already done so while setting up security, put the supplied SampleEJB.jar deployed JAR file into your CorbaServer's “pickup” directory.
  7. Ensure that the name server has been started. If CICS has not been started, start it now.
  8. Issue the following command at the CICS region console:
    CEMT PERFORM CORBASERVER(corbaserver_name) SCAN
    CICS scans the pickup directory, copies the SampleEJB.jar deployed JAR file to its shelf directory, and creates and installs a DJAR definition for it.
    Note: If you had to start CICS in step 7, this step is not necessary, because CICS will have scanned the pickup directory on startup.

    Authority required: RACF authority to create a DJAR and update access to the CORBASERVER.

  9. Publish the enterprise bean to the JNDI namespace. If your CORBASERVER definition specifies AUTOPUBLISH(YES), this will have happened automatically when the SampleEJB.jar deployed JAR file was installed. If your CORBASERVER definition specifies AUTOPUBLISH(NO), issue the following command at the CICS region console:
    CEMT PERFORM DJAR(SampleEJB) PUBLISH 

    Authority required: RACF authority to update a DJAR.

  10. Use the CICSConnectionFactoryPublish sample program to create a ConnectionFactory object for use by the CCI Connector for CICS TS, and to publish it to the name server. For instructions on how to use the CICSConnectionFactoryPublish program, see Using the sample utility programs to manage and acquire a connection factory.
  11. Ensure that the DB2 connection status is CONNECTED by issuing the following command at the CICS system console:
    CEMT SET DB2CONN CONNECTED