AutoTMF Software User's Guide (Update 11)
Configuring Automatic Transaction Processing
HP NonStop AutoTMF Software User’s Guide—429952-013
4-14
Changing Nowait IO to Waited IO
Changing Nowait IO to Waited IO
To commit automatic transactions, AutoTMF must find a point where no records are 
locked by the application program. Most programs have such points, but others have 
complex algorithms that lock records on some files before unlocking records on other 
files, leaving no commit opportunity. The configuration options SEPARATETX and, 
rarely, RECORDTX can be used in most cases to provide the necessary commit 
points.
However, a program may still be too complex to be managed using these methods. 
The WAITEDIO feature handles these rare cases, where a program opens a file 
multiple times for NOWAIT processing, and performs concurrent I/O to the same file. If 
the I/Os are performed under a common transaction, an I/O may be in progress at all 
times, preventing the transaction from being committed. If the I/Os are performed 
under separate transactions, operations that need to lock the same record on different 
opens may cause an internal deadlock.
If the WAITEDIO option is enabled for a NOWAIT file open, AutoTMF performs the 
following operations:
•
Issues an AWAITIO immediately after the read, write, or update operation.
•
Following the AWAITIO, AutoTMF commits any outstanding transaction using its 
usual algorithms, as directed by the configuration.
•
Saves the values returned by AWAITIO, and returns control to the program as if 
the READ or WRITE operation were still in progress. After a READ, the data buffer 
contains the input data.
FILEINFO and FILE_GETINFO_ return the error code for the last READ or WRITE 
operation (instead of AWAITIO). Any error returned by the AutoTMF generated 
AWAITIO is not visible to the application until the application calls AWAITIO. When the 
program calls AWAITIO, AutoTMF returns the saved values and makes the operation 
error visible to the application.
Configuration
To enable waited I/O, configure both the ATMFFileset and ATMFProgram WAITEDIO 
attributes. A program configured using the WAITEDIO option uses Waited I/O only for 
audited files that are also configured for Waited I/O.
In addition to specifying WAITEDIO, use the WAITTIME option to specify the maximum 
number of seconds an operation will wait for record locks to be released.
Considerations:
•
When AutoTMF performs AWAITIO, it does not know the timeout value that will be 
specified in the application call to AWAITIO. Configure the WAITTIME option on a 
file basis. To avoid perpetual waits, AutoTMF uses the default wait time of 64 
seconds.










