Sample: Running an application as an IMS application (MPR)

In this sample, you learn how to run the Miniloan application as an IMS COBOL or PL/I application that runs in a message processing region. The IMS COBOL or PL/I application executes business rules on an instance of the zRule Execution Server for z/OS.

Before you begin

  • Configure an instance of zRule Execution Server for z/OS and configure IMS to execute rules on the server.
  • Define the ++HBRHLQ++.SHBRLOAD(HBRMINIT) or ++HBRHLQ++.SHBRLOAD(HBRMINTP) program to IMS.
  • Ensure that the HBRMINIT or HBRMINTP program is defined to IMS as an application and as a transaction that runs in the message processing region.
  • Deploy the Miniloan RuleApp and the execution object model (XOM) to the persistence layer by submitting the ++HBRWORKDS++.SHBRJCL(HBRDPLOY) job. ++HBRWORKDS++ represents the high-level qualifier that is assigned to the working datasets.

About this task

The Miniloan application executes a set of loan eligibility rules against financial data for two borrowers. A message is returned that states whether the loans were approved or rejected.

The Miniloan application uses the following dataset members:
  • ++HBRHLQ++.SHBRCOBS(HBRMINIT) contains the COBOL Miniloan application.
  • ++HBRHLQ++.SHBRPLIS(HBRMINTP) contains the PL/I Miniloan application.
  • ++HBRWORKDS++.SHBRPARM(HBRSCEN) contains sample data for two borrowers.
  • ++HBRWORKDS++.SHBRPARM(HBRBATCH) contains runtime variables that identify the server instance to use for rule execution.

Procedure

  1. Start zRule Execution Server for z/OS.
  2. Make the following changes to the message processing region JCL:
    1. Define the zRule Execution Server for z/OS SHBRLOAD library to IMS in the STEPLIB statement.
      For example:
      //STEPLIB  DD DSN=WODM.HBR1.BASE.SHBRLOAD,DISP=SHR
    2. Add an HBRENVPR DD statement that points to the SHBRPARM(BATCH) member.
      For example:
      //HBRENVPR DD DISP=SHR,DSN=WODM.HBR.CUSTMISE.HBRR.SHBRPARM(HBRBATCH)
    3. If you are running the COBOL Miniloan application, then add a SCENARIO DD statement that points to the SHBRPARM(HBRSCEN) member.
      For example:
      //SCENARIO DD DISP=SHR,DSN=WODM.HBR.CUSTMISE.HBRR.SHBRPARM(HBRSCEN)
    4. If you are running the PL/I Miniloan application, then add a SCFILE DD statement that points to the SHBRPARM(HBRSCEN) member.
      For example:
      //SCFILE DD DISP=SHR,DSN=WODM.HBR.CUSTMISE.HBRR.SHBRPARM(HBRSCEN)
  3. Log in to the IMS console.
  4. Ensure that there are no outstanding messages that are waiting to be displayed on the terminal.
  5. Run the Miniloan application by entering HBRMINIT or HBRMINTP followed by a space.
  6. Verify that the JOBSTEP return code is set to 0.
    The output from the Miniloan application might occupy the space of more than one screen. If it happens, page forward to view all the messages.
  7. View the execution results at the IMS console or in SDSF.
    The Miniloan application returns a completion code and a reason code if an error occurs.