Accessing the same CA Datacom/DB table in a non-Ideal subprogram and the FOR construct in which the subprogram was called can have serious consequences. If both the CA Ideal calling program and the non-Ideal subprogram try to read the same set of records for update, a “deadly embrace” occurs and the job must be purged.
To access the record, the subprogram must wait until the CA Ideal calling program releases exclusive control before it can access the same record with exclusive control. But the CA Ideal program does not release exclusive control until the ENDFOR statement, which cannot execute until the call to the subprogram is complete and control returns to CA Ideal. The same situation online can result in the non-Ideal subprogram getting an CA Datacom/DB return code 18-EXCLUSIVE CONTROL DUPLICATE.
However, as long as one of the programs, either the CA Ideal calling program or the non-Ideal subprogram, is doing read-only access or each program is accessing a different table, the call can be made successfully from the CA Ideal FOR construct.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|