Software AG Products 2.4.1 | Reference Guide | Programming Considerations | EXCLUSIVE/ET Conversion
 
EXCLUSIVE/ET Conversion
Adabas Pre-Compiler provides a feature to convert programs written in EXLUSIVE mode to run in ET mode while running tests. This feature is for batch users who write a program in EXCLUSIVE mode because they intend to run in this mode in production.
While debugging the programs, the EXLUSIVE mode locks the files and prevents other users from debugging their own programs. Therefore, while debugging, it is preferable to run programs in ET mode.
The difference between these modes is in holding the record before updating in ET mode, and at the end of transaction commands.
The Adabas Pre-Compiler conversion feature changes EXU to UPD in the @OPEN command, and adds an extra @HOLD ISN command before an @UPDATE command and an extra ET command after an UPDATE, DELETE, or ADD command.
The following ways to apply the conversion feature are available:
*Use the DEBUG option in the @OPEN or @MODE commands to generate the necessary changes for the conversion to ET mode without any holds. Adabas Pre-Compiler adds these commands when necessary.
After the debug process, replace the DEBUG keyword with NODEBUG.
Recompile the program to transform it into an EXCLUSIVE mode program.
*If you choose not to use DEBUG and NODEBUG, Adabas Pre-Compiler generates the necessary code to transform the program from EXCLUSIVE to ET mode dynamically, according to the identifier OPENTYPE declared by Adabas Pre-Compiler and given a value by an external use routine at execution time. If the value of OPENTYPE is EXUET the @HOLD and @ET commands are performed, otherwise the program is in EXCLUSIVE mode.
With this option, the user does not have to recompile the program for production or testing.
The external module reads the DBID or an external parameter to decide on which database to perform the current execution.
Note: 
The EXCLUSIVE/ET conversion is performed by default when @OPEN or @MODE have the EXU parameter, unless the DEBUG and NODEBUG keywords are used.