In file-level Event Points, does APPX report reliably on the 'real' mode of
the I/O?
For example, if we're adding a record in an INPUT process, and a file-level
event point fires incrementing a value in a parent table, how does the file-
level Event Point for the event report set flags indicating what's going on?
When the event triggering the firing of the File EP's is an ILF statement,
then INTERACTIVE PHASE and MODE both are inferred from the ILF statement
itself:
WRITE - Add
REWRITE - Change
DELETE - Delete
This is true even if the ILF statement is itself part of a File EP.
Another interesting point: In a File's POST READ event point, if it fired off
because of an ILF statement, then ...
- INQUIRE is inferred if the read operation was without a hold on the record
- CHANGE is inferred if the read operation was with a hold on the record.
This then results in both INTERACTIVE PHASE and MODE being set accordingly.
1) The MODE and INTERACTIVE PHASE are not what they are in the Input process.
You will not see DATA SCROLL for instance.
2) Multilevel process families. For example, if you add an order in Order
Entry:
You add some header info, then lineitem info, then to the header and down to
charge/allowance items, then back to the header and down to order comments,
then back to the header to complete the order.
You will get several file level event points fired. When you go from
the header down to the lineitems while adding the order, APPX will write
the order header PCF and fire the event points with a MODE=ADD, but the
order is not done yet.
It will then re-trigger the file event points several more times in
MODE=CHANGE as it resaves the PCF during the remaining entry of the
order including the exit from the final frame of the order header to
complete the order.
So, if you want to do something when the order is completed, you need
some way to detect a completed order other than MODE=ADD in the file
level event point.
Also, File Event Points are fairly isolated from the trigger process
that fires them. You can't set a workfield in your input process and
check it in the file event point. Only the PCF record is shared. |