Question & Answer
Question
Answer
1. Since the trigger program is running in a multi-threaded job, the RPGLE modules must be made thread safe. One of the major thread-safety issues is the handling of static storage. When multiple threads access the same storage location at the same time, unpredictable results can occur. One common error message is the program unexpectedly failing with an MCH1210 message. To make the module thread-safe you must specify either:
THREAD(*SERIALIZE) or THREAD(*CONCURRENT).
The RPG Reference manual has additional details about the THREAD keyword on page 370:
https://www.ibm.com/docs/en/ssw_ibm_i_75/pdf/sc092508.pdf
2. Since the Trigger program is executed in a mult-threaded environment, this can lead to recursive calls to the RPGLE program. This will result in RNX8888 error messages. To avoid this, the program needs to be compiled with:
DFTACTGRP(*NO) ACTGRP(*NEW)
Was this topic helpful?
Document Information
Modified date:
09 December 2024
UID
nas8N1022127