Defining IMS transactions

An IMS transaction is a message destined for an application program. In defining a transaction to IMS, you identify several characteristics, including scheduling rules, exceptions to those rules, transaction codes, output limits, and more.

Use the TRANSACT macro (or the CREATE TRAN command) to define the overall online IMS system response to incoming messages.

With the TRANSACT macro, you can relate one or more transaction codes to the PSB that was named in the preceding APPLCTN macro.

The TRANSACT macro is supported in the DB/DC and DCCTL environments, but not the DBCTL environment. The following table summarizes transaction characteristics that are declared in the TRANSACT macro:

Note:

The CREATE TRAN command can be used instead of the TRANSACT system. To learn more, see CREATE TRAN command.

Table 1. Summary of transaction characteristics defined with the TRANSACT macro
Transaction characteristic TRANSACT parameter Parameter description
What are the transaction identifiers? CODE Identifies unique transaction codes.
SYSID For Fast Path, also declares a possible routing code. Identifies remote system and local system.
What rules govern program scheduling for this transaction? DCLWA Log write-ahead option.
PARLIM Queue count that triggers parallel scheduling.
PRTY Normal priority and alternate priority when queues build up.
What exceptions are there to the scheduling rules? MAXRGN Limit for number of regions that can be scheduled per transaction.
PROCLIM Limit for number of input messages processed or the processing time.
What type of processing? INQ Update database or not. Recovery required or not.
FPATH Fast Path potential transaction.
MODE Whether or not transactions are autonomous.
MSGTYPE Multisegment code or not. Response before more input or not.
ROUTING Whether or not program is aware of originating system.
SERIAL Serial processing of transaction.
SPA Conversational transaction.
WFI Wait for input transaction.
What edit operations? EDIT

Whether or not to convert input data to uppercase. Name of an input edit routine.

What limits on output? SEGNO Maximum segments per transaction.
SEGSIZE Maximum segment size.

Configuring IMS transactions

From the application, you need to determine how a transaction is to be processed and how it looks to the user. The following table helps you specify the correct parameters on the TRANSACT macro.

Table 2. Transaction configurations and recommended parameters
Transaction configuration Recommended keyword parameter
Declares that the program is continuously available and not reloaded each time it is scheduled. WFI
Specifies that the transaction is an inquiry, and its database processing does not cause any updates. No recovery at system restart is required. INQ=(YES,NORECOV)
Declares that the transaction is an inquiry, but update processing might occur. Recovery at system restart is required INQ=(NO,RECOV)
Declares that a response to an input message is the next event. MSGTYPE=(RESPONSE)
Declares that the response to an input message allows multiple message input actions. MSGTYPE=(NONRESPONSE)
Specifies that database buffers are written to direct access upon each request for a new message. SNGL is forced for WFI applications. MODE=SNGL
Specifies a group of transactions that are processed together. MODE=MULT
Declares that the transaction is conversational. SPA=
Declares the scratchpad area size in bytes. SPA=(size in bytes)
Declares that an input message edit routine is present. The member name of the bound module in IMS.USERLB (or equivalent library) is name parameter. UC specifies that input is translated to uppercase before presentation to program. EDIT=(UC,name)
Protects output message queues by testing the size of an output segment. SEGSIZE=size
Protects output message queues by testing the number of segments issued per transaction processed. SEGNO=number

IMS Connect transaction expiration support

If an expiration time is specified in IMS, transactions can expire and be discarded if IMS does not process them before the expiration time is exceeded.

The transaction expiration time for a transaction is set in the definition of the transaction in IMS and is not specific to OTMA. In IMS, you can set or modify the expiration time for a transaction in the following ways:
  • When a transaction is defined during IMS system definition, by specifying the EXPRTIME parameter in the TRANSACT stage-1 system definition macro.
  • When a transaction is created during runtime by using dynamic resource definition, by specifying the EXPRTIME keyword on the CREATE TRAN type-2 command.
  • For a transaction created by the Destination Creation exit routine (DFSINSX0), the exit routine can set the expiration time.
  • For an existing transaction, by specifying the EXPRTIME keyword on the UPDATE TRAN SET(EXPRTIME) type-2 command. Dynamic resource definition does not need to be enabled.

A transaction expiration time set by IMS Connect overrides any transaction expiration time that is specified in the definition of the transaction in IMS.