I would like to be able to trap/capture/copy any PC DMIS error that occurs while the program is running wituout interefering with the normal execution of PC DMIS,
and without requiring operators to interact with PC DMIS to make it happen.
I don't want my code to handle the errors, I just want to capture/copy the error number and description if possible.
Then I want to write the PART PROGRAM NAME, DATE, TIME, ERROR NUMBER, ERROR DESCRIPTION to a CSV type of text file.
I would like all PCDMIS programs to write to the same Text file appending to the end of this Text file.
What would you suggest as the best way to accomplish this task?