Configuring IMS to access the IBM z/OS Connect server

To enable the client application to call the contacts API through the IBM® z/OS® Connect , enable the communication stub in IMS.

About this task

The IBM z/OS Connect communication stub is a module that establishes HTTP connections with the IBM z/OS Connect server, transfers data between z/OS applications and IBM z/OS Connect , and handles status and return codes that are issued by IBM z/OS Connect . Before your application can make RESTful API calls, you must configure the communication stub in IMS.

Procedure

  1. Include the load module BAQCSTUB from the hlq.SBAQLIB data set into the IMS STEPLIB concatenation.
  2. In your message processing region (MPR) job, specify the URI and port number for the IBM z/OS Connect server in the CEEOPTS DD statement.
    CEEOPTS   DD *
     ENVAR("BAQURI=MYSERVER.MY.COM", "BAQPORT=10053")
    For more information about options you can specify, see Configuring IMS to access IBM z/OS Connect for API calls.
  3. Compile and link your IMS application with CEEUOPT to set POSIX(ON). The following example demonstrates how to assemble a CEEUOPT CSECT to set POSIX(ON), and link the CEEUOPT CSECT to the load module of the IMS application being run.
    //APIPRGM JOB ...
    //*
    //* STEP 1: ASSEMBLE CEEUOPT CSECT
    //*
    //CEEUOPT EXEC PGM=ASMA90,COND=(4,LT),REGION=0M,
    // PARM=’OBJECT’
    //SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
    // DD DSN=CEE.SCEEMAC,DISP=SHR
    //SYSIN DD *
    CEEUOPT CSECT
    CEEUOPT AMODE ANY
    CEEUOPT RMODE ANY
             CEEXOPT POSIX=(ON)
             END
    /*
    //SYSLIN DD DSN=<HLQ>.ASM.OBJECT(CEEUOPT),DISP=SHR
    //SYSPRINT DD DSN=<HLQ>.ASM.LISTING(CEEUOPT),DISP=SHR
    //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //*
    //* STEP 2: COMPILE AND LINK COBOL PROGRAM
    //*
    //APIPRGM EXEC IGYWCL,LNGPRFX=’IGYV5R20’,
    // LIBPRFX=’SYS1’,
    // PARM.COBOL=’TEST SOURCE’,
    // PARM.LKED=’LIST MAP XREF’
    //COBOL.SYSIN DD DSN=<HLQ>.COBOL.SOURCE(APIPRGM),DISP=SHR
    //COBOL.SYSLIB DD DSN=<HLQ>.COBOL.COPYLIB,DISP=SHR
    //COBOL.SYSLIN DD DSN=<HLQ>.COBOL.OBJECT(APIPRGM),DISP=SHR
    //COBOL.SYSDEBUG DD DSN=<HLQ>.COBOL.SYSDEBUG(APIPRGM),DISP=SHR
    //COBOL.SYSPRINT DD DSN=<HLQ>.COBOL.LISTING(APIPRGM),DISP=SHR
    //LKED.OBJECT DD DSN=<HLQ>.ASM.OBJECT,DISP=SHR
    // DD DSN=<HLQ>.COBOL.OBJECT,DISP=SHR
    //LKED.RESLIB DD DSN=IMS.SDFSRESL,DISP=SHR
    //LKED.SYSLIN DD *
    INCLUDE OBJECT(CEEUOPT)
    INCLUDE OBJECT(APIPRGM)
    ENTRY APIPRGM
    NAME APIPRGM(R)
    /*
    //LKED.SYSLMOD DD DSN=IMS.PGMLIB(APIPRGM),DISP=SHR
    Important:
    • Ensure that POSIX is set to ON to allow Language Environment to access the UNIX System Services environment for the required HTTP-enabling services. A POSIX(ON) environment also requires the user ID associated with the address space that uses these HTTP-enabling services to have an OMVS segment defined and associated with it.
    • Persistent connections are automatically enabled between the IBM z/OS Connect server and the communication stub in the IMS region, which requires IBM z/OS Connect V3.0.10 or later.
    • There are some restrictions when using COBOL programs. For more information, see Configuring other z/OS applications to access IBM z/OS Connect for API calls.