TRDATA processing – behind the scenes

Many years ago, to be precise in 2005, I built a concept for automated processing of TRDATA records. At this time there was no way to enter warehouse transaction through PowerLink, NetLink or SystemLink. With this concept, you can not only do automated processing, but also extend the solution in a second step to create a business object over TRDATA and use it for interactive transaction handling. Since TRDATA is still used and probably will stay for a while, here are the details how to achieve that:

  1. Create a trigger „TRDATA after insert“, doing a SNDDTAQ to DQJUA, DQJUB and DQJUC (depending on the type of transactions). That will trigger the U-Jobafter insert a new record (be sure that the u-jobs AMJUA, AMJUA and AMJUC are started). If you need to find the next transaction number use DTAARA ZNXTRN. Please lock the data area before updating to prevent concurrent updates.
  2. Create a file for transaction results e.g. TRDATARES with two fields: Transaction number and one (long) Text-Field.
  3. Create MSGQs JCAMSGQ, JCBMSGQ, JCFMSGQ in MAPICS-Library List.
  4. Create a trigger „TRDATA after update“ reading these MSGQs. If there was any error during transaction (see Transaction status in TRDATA) you will find the transaction number and the error message in the message queues. Evaluate this and write the error message in TRDATARES.
  5. So you will get the Result of your transaction after a very short time (less then one or two seconds)

Final result TRDATA processing

With the final result, a business object for TRDATA which is enabled for SystemLink you can also now use Uploadia by MJR to create all kind of transactions (warehouse, ON/OFF and more) through a simple Excel upload. Many of our customers are using this, so it is time to share this idea with the XA users community. Please do not hesitate to contact us if you have any questions.

You have any questions?

Infor XA SystemLink with Node-RED
Automatic reorganization of IBM i tables using RGZPFM