Suppose , my program processes a file , but before processing the file, how can I check if the file is locked (I want to check this because I dont want the program to crash in case of a file lock).
If I do a Chain(E) (File Key) Critical_File and then check %error , this case it will not tell me if the specific error is for a File Lock case.
So in a RPGLE program how can I get the status if a file used by the program is locked?
A answer will be really helpful.
There is multiple ways.
One can use a minimal infds like
But since %error monitor/on-error has been added to the language (notice there is no operation extender here)
And monitor/on-excp has recently been added (notice there is no operation extender here either)