This is one is likely so strange it may not apply to anyone else. I use physical file trigger programs on key files to trap changes for auditing. Not sure how widely that technique even used.
But this is so strange I can hardly believe it myself. I have a Val app that releases planned Mfg shop orders, multiple orders in one post to server. It passes in array of items/qty to open order for. The server side RPG just loops through array, then calls (old school call, no ILE procedures) a standalone program that creates the Shop order and it's operations.
That program correctly retrieves the User Id the Val program is running under (VVCALL driven) and writes correct user id to the Shop Operation file for each shop order. No problems.
But when trigger fires and it calls trigger program (RPG), the first order is correctly updating with real user id. But orders 2,3 etc all get written with QTMHHTTP as user, not the real user id. I've noticed a 3-4 second delay in the time stamp written to audit file by trigger pgm from 1st order and the 2nd one. Everytime. But all orders after the first one all have exactly same timestamp, to the second.
I have many trigger programs in use here but this is only app where multiple calls to same creation program is done. All the others you are always just creating one vendor or one customer. Those all update the correct user id everytime.
It is only this repeated call that causes this. My guess is only IBM could figure this out but thought I'd put this out here just in case.
But this is so strange I can hardly believe it myself. I have a Val app that releases planned Mfg shop orders, multiple orders in one post to server. It passes in array of items/qty to open order for. The server side RPG just loops through array, then calls (old school call, no ILE procedures) a standalone program that creates the Shop order and it's operations.
That program correctly retrieves the User Id the Val program is running under (VVCALL driven) and writes correct user id to the Shop Operation file for each shop order. No problems.
But when trigger fires and it calls trigger program (RPG), the first order is correctly updating with real user id. But orders 2,3 etc all get written with QTMHHTTP as user, not the real user id. I've noticed a 3-4 second delay in the time stamp written to audit file by trigger pgm from 1st order and the 2nd one. Everytime. But all orders after the first one all have exactly same timestamp, to the second.
I have many trigger programs in use here but this is only app where multiple calls to same creation program is done. All the others you are always just creating one vendor or one customer. Those all update the correct user id everytime.
It is only this repeated call that causes this. My guess is only IBM could figure this out but thought I'd put this out here just in case.
Comment