Version 4.2.6 for Mainframes
 —  Natural Advanced Facilities  —

NAF - Features in an IMS TM Environment

This document explains the features of Natural Advanced Facilities specific to an IMS TM environment.


Overview

NATSPOOL accumulates all reports generated during a Natural user session in the spool file.

To physically print a report (that is, to send output to an IMS LTERM assigned to a printer), NATSPOOL performs the following steps:

  1. The MPP Natural inserts a message into the IMS message queue for a transaction code that is used as (non-conversational) input transaction code for a BMP region. This transaction code can be a Wait for Input (WFI) transaction code or not.

  2. If the BMP is generated as WFI and has been started by the IMS TM operator, all reports which are created during the IMS TM session are printed by this BMP. If the BMP is not generated as WFI, Natural issues the /STA REGxxxxxxxx command to start the BMP region, where xxxxxxxx represents the BMP JCL member name specified in the spool file options (see Function 30.5).

  3. The BMP region executes Natural under the control of the Natural BMP interface for IMS TM. The input to Natural must be as follows:

    //CMSYNIN DD *
      LOGON SYSPRINT
      SVPIMS01
      FIN
    /*
  4. The Natural program SVPIMS01 in library SYSPRINT retrieves the message from the IMS message queue to find out what has to be printed and sends the selected output to the IMS printer. Depending on whether the transaction code is WFI or not, the BMP region either "waits" for the next input message or terminates. The message contains the BMP transaction code specified in the spool file options (see Function 30.5) and the LTERM name of the IMS printer. Since SVPIMS01 dynamically calls CMGETMSG, the load library containing this module must be concatenated in the BMP JCL.

The logical connection between the two Natural sessions used by NATSPOOL is shown below.

Top of page

IMS TM Options

To install NAF in an IMS TM environment, set the NATSPOOL parameters listed below.

You can also specify these parameters with Function 30.5 (Set Spool Option) as described in Layout of Spool File.

Parameter Explanation
BMPCODE= name Specifies the BMP transaction code.
BMPNAME= name Specifies the BMP JCL member name.
BMPWFI=ON/OFF Specifies the BMP WFI option.

You can omit a parameter or set the value (name or OFF/ON) assigned to blank.

The following rule of precedence applies to the use of parameters:

Top of page

Wait for Input WFI

Under IMS TM, an option is provided to use only one BMP to print all reports which are created during an IMS TM session. To make this possible, the BMP program SVPIMS01 in library SYSPRINT can be made to "Wait for Input" after it has been started by the IMS operator. No /STA REG command will be issued from the MPP region after the message for the BMP input transaction code has been inserted in the IMS message queue.

To stop the BMP, issue the command /PSTO REG. The BMP is stopped automatically when the database in which the spool file is located is no longer active, or if any error occurs during execution.

To use this feature, the BMP transaction must be generated as WFI in the IMS TM TRANSACT macro, and "Wait for input" must be set in the spool file options or in the NAFPARMI parameter module.

Since the Natural Advanced Facilities transaction can be run as BMP-WFI, it is also possible to have this printer transaction as an online transaction running under the message-oriented online Natural.

This can be achieved by specifying the spool file options with a BMP ID equal to a non-conversational transaction code received by the message-oriented online Natural. Also "Wait for input" equal to Y is required to suppress the /STA REG command, because this transaction is scheduled like the normal conversational dialog-oriented Natural transactions.

To tell the message-oriented Natural to run the SVPIMS01 Natural print program, a bootstrap module with the following Natural dynamic parameters must be generated as the transaction start program:

STACK=(LOGON SYSPRINT;SVPIMS01),PRINTER=LTERMP01

Other requirements, such as WRKPCBS are equivalent to the BMP version. You will find instructions for generating the bootstrap in the section Installing the Natural IMS Interface of the Natural Installation documentation.

When deciding how to run Natural Advanced Facilities under IMS, you need to take into account site specifics. For example, extremely long printouts may hinder other online transactions running in the same region. Permanently having print transactions in the queue may also lead to a region lock by printing. You can avoid this by using IMS transaction parameters, such as PROCLIM.

Top of page