Gen UNIX/Linux "online with display" load module without UI ends with TIRM122E
search cancel

Gen UNIX/Linux "online with display" load module without UI ends with TIRM122E

book

Article ID: 215341

calendar_today

Updated On:

Products

Gen

Issue/Introduction

Gen UNIX/Linux Block Mode application Procedure Steps with a display that are executed from a script in an unattended manner may experience an error TIRM122E if they are terminated improperly. The transaction is successful, however, ending with an error can lead to confusion. 

In this instance, the reason the Procedure Step had a display was to allow clear screen input to the transaction. As it was an 'execute first' load module, it was designed to run the transaction and then terminate and there was never any intent for a screen to be displayed to a user.

Problems will arise if the script launching the load module uses the following syntax:
<Load Module>  <Trancode> <Clear screen input>  << EOF

Using this syntax the Gen runtimes interpret the '<< EOF' as a command key entry and execute again. However this creates a situation where it would pass in garbage characters as the <trancode>, thus resulting in the error:
TIRM122E:  NO CLEAR SCREEN PROCEDURE STEP FOR TRANCODE

Environment

Gen UNIX/Linux Block Mode applications.

Resolution

Gen Online Load Modules with a screen are designed to interact with a terminal.
The only supported methods for ending these types of load modules that are built to run from command is by using terminal input that are recognized by them. 
In the situation where these load modules are being started in a script where there is no expectation of a user inputting the proper termination key strokes, the only supported method is by using a playback script that contains the #clear# entry e.g.

<Load Module>  <Trancode> <Clear screen input>  -p <playback script>

The <playback script> contains one entry, '#clear#'.  Executing the load module in this manner would result in:

  1. The transaction running using the <clear screen input>
  2. The transaction would end and the Gen runtimes would read the <playback script>
  3. Since the first entry in the <playback script> was the "#clear#" command, the load module would terminate gracefully.

Additional Information

Alternative method:
If the design is for this load module is to be executed and then terminate gracefully then there are alternatives to the playback script method.
By adding a transfer flow to a second Procedure Step that has no display the application will terminate gracefully.
The second Procedure Step need not have any Action Diagram statements at all. It will execute, do nothing and then terminate normally.
Thus the first Procedure step can be run with only the <trancode> and <clear screen input> with no need of using a <playback script> to end the transaction.