Making the RRSAF language interface (DSNRLI) available

Before you can invoke the Resource Recovery Services attachment facility (RRSAF), you must first make available the RRSAF language interface load module, DSNRLI.

About this task

Part of RRSAF is a DB2® load module, DSNRLI, which is also known as the RRSAF language interface module. DSNRLI has the alias names DSNHLIR and DSNWLIR. The module has five entry points: DSNRLI, DSNHLI, DSNHLIR, DSNWLI, and DSNWLIR. These entry points serve the following functions:
  • Entry point DSNRLI handles explicit DB2 connection service requests.
  • DSNHLI and DSNHLIR handle SQL calls. Use DSNHLI if your application program link-edits RRSAF. Use DSNHLIR if your application program loads RRSAF.
  • DSNWLI and DSNWLIR handle IFI calls. Use DSNWLI if your application program link-edits RRSAF. Use DSNWLIR if your application program loads RRSAF.

Procedure

To make DSNRLI available:

  1. Decide which of the following methods you want to use to make DSNRLI available:
    • Explicitly issuing LOAD requests when your program runs.

      By explicitly loading the DSNRLI module, you can isolate the maintenance of your application from future IBM® maintenance to the language interface. If the language interface changes, the change will probably not affect your load module.

    • Including the DSNRLI module in your load module when you link-edit your program.

      A disadvantage of link-editing DSNRLI into your load module is that if IBM makes a change to DSNRLI, you must link-edit your program again.

    Start of changeAlternatively, if using explicit connections via CALL DSNALI, you can link-edit your program with DSNULI, the Universal Language Interface.End of change

  2. Depending on the method that you chose in step 1, perform one of the following actions:
    • If you want to explicitly issue LOAD requests when your program runs:

      In your program, issue z/OS® LOAD service requests for entry points DSNRLI and DSNHLIR. If you use IFI services, you must also load DSNWLIR. Save the entry point address that LOAD returns and use it in the CALL macro.

      Indicate to DB2 which entry point to use in one of the following two ways:
      • Specify the precompiler option ATTACH(RRSAF).
        This option causes DB2 to generate calls that specify entry point DSNHLIR.
        Restriction: You cannot use this option if your application is written in Fortran.
      • Code a dummy entry point named DSNHLI within your load module.

        If you do not specify the precompiler option ATTACH, the DB2 precompiler generates calls to entry point DSNHLI for each SQL request. The precompiler does not know about and is independent of the different DB2 attachment facilities. When the calls that are generated by the DB2 precompiler pass control to DSNHLI, your code that corresponds to the dummy entry point must preserve the option list that is passed in register 1 and call DSNHLIR with the same option list.

    • If you want to include the DSNRLI module in your load module when you link-edit your program:
      Include DSNRLI in your load module during a link-edit step. For example, you can use a linkage editor control statement that is similar to the following statement in your JCL:
      INCLUDE DB2LIB(DSNRLI).
      By coding this statement, you avoid inadvertently picking up the wrong language interface module.

      When you include the DSNRLI module during the link-edit, do not include a dummy DSNHLI entry point in your program or specify the precompiler option ATTACH. Module DSNRLI contains an entry point for DSNHLI, which is identical to DSNHLIR, and an entry point for DSNWLI, which is identical to DSNWLIR.