Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Stacking services

A terminal user can stack a service, i.e. he or she can interrupt an already started service, insert another service and, when this terminates, continue the interrupted service. A service can only be stacked if it is located at a synchronization point, i.e. directly after a PEND RE.
There are two ways of doing this:

  • by pressing a function key generated with SFUNC ...,STACK=...

  • by using the event exit INPUT

Continuing a stacked service

A stacked service, also known as a predecessor, is reactivated as soon as the inserted service is terminated by PEND FI. The terminated service generates an output message. Since openUTM only permits service stacking at a synchronization point, both the last output message and the service-specific areas (KB, LSSB) of the predecessor are still available. You use the (last) MPUT call in the inserted service to determine how the output messages of the two services are to be processed.
You have three options:

  • MPUT NE in the inserted service outputs the message of this service on the screen together with message K096.The terminal user presses Enter to receive the last output message of the predecessor.

  • MPUT PM with KCLM = 0 immediately outputs the last output message of the predecessor (PM stands for "predecessor message").

  • MPUT PM with KCLM > 0 (permitted only in format mode) overwrites the output message of the predecessor with the message of the inserted service to the length defined in KCLM. openUTM then outputs this revised predecessor message. The format specified in MPUT PM should be a partial format of the predecessor format.

MPUT PM is only permitted in an inserted service if the program unit is terminated by PEND FI, i.e. only in the last processing step of the service.

Service stacks

Service batches are formed by stacking services.
You can retrieve information about the current service stack in the following ways:

  • the KCHSTA and KCDSTA fields of the KB header show the size of the stack and how this has changed since the last program unit run

  • the INFO call INFO PC (predecessor service) provides information about the direct predecessor in the batch.

PEND FI in an inserted service always returns you to the immediate predecessor; a stack is deleted when the last inserted service has terminated.