Step 4: Defining the transactions and the simulation environment

Add the appropriate simulator commands in the BTSIN data set to define the transactions to be performed, the logical terminal to be simulated, the format of the simulator statements and output listing, and what debugging aids that you want to use.

About this task

Before IMS Batch Terminal Simulator can process a transaction code, the IMS teleprocessing system generation information about that transaction must be available to IMS Batch Terminal Simulator. You supply this information by using the ./T command.
Note: ./T command is the only required simulator command of IMS Batch Terminal Simulator. Other simulator commands are optional.

In interactive mode, you can specify the simulator commands in the BTSIN data set or enter them directly through the TSO screen while the TSO session is active.

Procedure

  1. In the BTSIN data set, specify the terminal and transaction names by using ./T commands.

    The only destination name that is supplied by the BTS procedure is the logical terminal PCB name for the source of the input message. You must explicitly define each alternate logical terminal name and primary and secondary transaction name with the ./T command.

    The following example shows a format to define a transaction. In this example, the TC= operand defines the transaction code, and the MBR= operand defines the load module name.

    ./T TC=PART LANG=CBL MBR=DFSSAM02 PSB=DFSSAM02 
    ./T TC=DSPINV LANG=CBL MBR=DFSSAM03            
    

    The following example shows a format to define an alternate logical terminal name. In this example, the TC= operand specifies the logical terminal name.

    ./T TC=BTSTERM  MDL=1

    If the messages that are inserted at the alternate logical terminal are to be presented in an output format by using the Message Format Service control blocks, you must also specify the device and feature code (if FEAT=7F is not acceptable) in the ./T command. Spool data sets are defined as alternate logical terminals.

    Related reading: See ./T command for the keywords, operands, and examples for specifying the ./T commands.

    Tips:
    • Unlike IMS, IMS Batch Terminal Simulator allows the use of a load module member name other than the PSB name for the transaction. This facility can be used for testing multiple versions of a single application with IMS Batch Terminal Simulator, but the modules must be correctly named for IMS operation.
    • Except for the required operands, if the operands are not specified, IMS Batch Terminal Simulator default values are used. If you do not want to use the default values, specify additional ./T commands to define the PSB name, SPA size, input message edit module name, programming language, program type, and process limit count (PLC).

      Related reading: See Simulator command summary for the list of default values.

  2. If necessary, define the I/O logical terminal name by coding the ./D command with the LTERM= operand.

    The default I/O logical terminal is set to LTERM=IOPCB. Specify LTERM=name to override the default.

    Tips: You can also use the ./D command specify the following attributes:
    • You can specify different values for the end-of-segment (EOS) and end-of-message (EOM) indicators if the default values (* and $ respectively) are not acceptable.
    • If you want to use a device-dependent output formatter to format input and output messages, specify additional ./D command keywords to complete the specification.
  3. If necessary, specify other simulator commands.

    The ./T command is the only required simulator command; however, IMS Batch Terminal Simulator provides additional simulator commands. After the ./T commands, place additional simulator commands that are applicable.

    Examples:
    • You might want to specify the ./R command, which indicates to IMS Batch Terminal Simulator a change in the data format of all simulator statements that follow during the run.
    • To substitute a given PCB status code on a designated DL/I call, specify the ./S command with the STCD= keyword.
    • Messages that are suffixed with the letter I are informational messages. To suppress IMS Batch Terminal Simulator informational messages and call trace information, specify ./O TSOMLVL=0. With this option, the information is not displayed on the TSO terminal, and the TSO terminal normally shows only IMS screens.
    • You can set default keywords and operands for ./E commands by using the environment specification table (BTSCHTBL). When the table is used, you do not need to specify the ./E commands in your BTSIN data set.
    Related reading:
  4. Organize the order of the simulator commands.

    If you are specifying the simulator commands in the BTSIN, consider putting all ./T commands first in the input stream to ensure that the teleprocessing generation information is available to IMS Batch Terminal Simulator for the duration of the run.

    If a primary transaction generates secondary transactions that are enqueued by IMS Batch Terminal Simulator, they are scheduled and processed by IMS Batch Terminal Simulator immediately upon completion of the primary transaction. When all the secondary transactions have been processed, IMS Batch Terminal Simulator continues to process primary transactions. Therefore, simulator commands that relate to secondary transactions must be included prior to the completion of the primary transaction because IMS Batch Terminal Simulator does not read the next statement from the input stream until all secondary transactions have already been processed.

  5. If necessary, customize the TSO CLIST or the BTSIN to accommodate the characteristics of your application. The following characteristics might require additional customization:
    • Applications that are written in REXX or Java™
    • Applications that access Db2®, IBM® MQ, or data entry databases (DEDBs)
    • Applications that trigger secondary transactions
    • APPC applications or 3270 applications
    For the customization procedures, see Customizing JCL for specific applications.