From: David E. <de...@us...> - 2007-01-11 18:18:42
|
David Essex wrote: > Harold Norris wrote: >> ... >> If you don't get this when you run it, I'll send over a copy of my >> library. The only other addition to the library is a trap for >> control-c. >> My customer's employees enjoy, I think, entering control-c >> to terminate what ever they are doing and it has caused >> massive damage to the data files. > ... > Well 'control-c' is trapped by the curses library, I think. > It is supposed to be used in emergency situations only. > > The TC RTL does not do any clean-up of the run-time unit. > As a result, the files are not sync-ed and closed. I will add a control-c trap to the RTL defined at run-time, with the following options. 1) Ignore This option will trap but ignore the signal 2) Exit This option will trap and perform an clean exit of the program using the RT exit routines. Hint: The 'CRT STATUS' can be used to determine a key press. Function keys F1-Fn (PF1-PFn), can be used to perform special functions. Key: F1 value: 0264 + 1 Key: Fn value: 0264 + n Example: IDENTIFICATION DIVISION. ... CONFIGURATION SECTION. SPECIAL-NAMES. CRT STATUS IS status-field. ... WORKING-STORAGE SECTION. 01 status-field PIC 9(04) VALUE 0. 88 status-field-f3 VALUE 0267. ... PROCEDURE DIVISION. ... perform A-200 until status-field-f3 . ... A-200. ... accept ... line 2 position 1. ... Hope this helps. David Essex |