I have a CLLE trigger program that is trying to set a job environment. I am manipulating the LIBL on the fly based on the location of the order and if it's TEST or LIVE. I get the info from the trigger input parms which has the order#, location, TEST or LIVE, order# and order status which is blank on input. I set a dataarea flag to say job in progress and change the LIBL accordingly.
Then CLLE then calls an RPGLE program using the order# as a parm. This program is then trying to move data from the web source into the proper file for processing. Simply a chain on order# from web file and write to file/lib for processing. It then tries to chain to a logical over the trigger file to update the staus and processed date and time. I get an error on the chain. It says record already locked to this job.
I figured I would try removing the chain, seeing the record was already locked. When I did this it now gives me an error on the UPDATE command saying it could not do the update without a prior read or chain?
The trigger works fine, the data in the parms is correct. The only issue left is the lock preventing me from update the control file.
Any ideas on how to prevent the lock?
My trigger command ADDPFTRG FILE(EXTRANET/WCTLH) TRGTIME(*AFTER) TRGEVENT(*INSERT) PGM(EXTRANET/WXTRAOECL) TRGLIB(EXTRANET)
iSeries , V5R4
April 7, 2010 4:23 PM
April 8, 2010 1:37 AM