search cancel

Calling CA Gen Unix "online with display" load module without UI interaction (TIRM122E)


Article ID: 215341


Updated On:




CA Gen Procedure Steps with a display that are executed from a script in an unattended manner will 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.
There was never any intent for a screen to be displayed to a user. The load module was called from a script as follows:

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

The <playback script> contained 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.


Problems would arise if the script launching the load module used the following syntax instead:

            <Load Module>  <Trancode> <Clear screen input>  << EOF

Using this syntax without the <playback script> option, the Gen runtimes would interpret the '<< EOF' as a command key entry and execute again. However, this method would also create a situation where it would pass in garbage characters as the <trancode>, thus resulting in the error:


Release : 8.5, 8.6

Component : CA Gen 


CA 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.

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.