IDMS
IDMS
IDMS
PROGRAM SIZE
DC programs should be limited to 120K. Programs larger than this should be reduced
in size by limiting working storage.
2. DML COMMANDS
Use only DML commands for all IDMS calls. Allow the DML preprocessor to translate
commands into correctly formatted call statements.
3. WORK AREAS
IDMS-DC: Programmers must initialize "copied in" work areas (maps and records)
which are copied in from the IDD.
4. BIND COMMAND
IDMS record BIND statements and area READY statements should be processed after
it has been determined that accessing the database is necessary. Whenever possible,
housekeeping and editing should be performed first.
5. READY COMMAND
READY the areas individually and only the areas that need to be accessed.
READY the areas with appropriate usage mode as determined by application processing
requirements. This limits database contention.
Issue all necessary READY statements contiguously (no intervening processes) at one time. This
reduces the chance of area deadlock and allows more efficient processing.
6. DBKEY USAGE
Direct database entry is the fastest access method. When practical, DBKEYs should be
temporarily saved and used within a program (i.e., to access a previously retrieved record after
performing several intervening database operations).
Use caution when DBKEYs are saved outside of a program. DBKEYs of erased records are
reused. An IDMS UNLOAD/RELOAD changes all DBKEYs. Therefore, incorrect results may
occur if DBKEYS are saved outside of a program. An exception is:
In on-line pseudo-conversational programming, it may be necessary to keep DBKEY(s) accessible
in temporary storage until the end of a functional task which could involve several programs.
8. FIND/OBTAIN COMMAND
When the contents of a record are not needed, (i.e., it is necessary to establish currency only), use
the FIND command. IDMS does not go through the overhead of moving the contents of the record
occurrence into the program storage area with the FIND command.
Use the "OBTAIN" to locate and access database records. Do not use the FIND/GET sequence of
verbs when the contents of a record are needed. Either set of commands produce the same results
but the 'OBTAIN' uses less verbiage.
9. STORE COMMAND
All key values and currencies for automatic sets should be defined and established
immediately before issuing a "STORE" command.
19. SUBROUTINES
IDMS-DC: Stable, closed procedural sub-routines (i.e., a date routine) should be
invoked by using a "CALL" statement instead of a DC LINK. The DC overhead involved
with handling a LINK can be avoided.
Explicit locks, of both the SHARED and EXCLUSIVE variety, are placed on record occurrences by
execution of the KEEP verb and the FIND/OBTAIN verb with the KEEP option.
LOCK Release:
Implicit SHARED locks are valid until a change of currency is effected, or until the run-unit
terminates. All other locks are valid for the duration of the run-unit.
Implicit EXCLUSIVE locks are released with the issue of a COMMIT, ROLLBACK, or FINISH
verb.
21. KEEP LONGTERM
IDMS-DC: This option may be used for heavily accessed information. Storage can be
allocated for the short term or long term and can be released explicitly through
program request. This option should be considered for only relatively small amounts
of information since storage is obtained from the storage pool. Kept storage is
maintained across tasks running on the same logical terminal. Data "KEPT" in the
storage pool is not recoverable from a system shutdown or failure. Data in the
storage pool is not preserved from one execution of IDMS-DC to another.
24. DEADLOCK-ROLLBACK
Deadlock conditions can occur whenever two or more run-units attempt to set record locks in a
sequence that prevents the further execution of either run unit. For example, consider the situation
where run-unit X has record 'A' locked and requests a lock on record 'B', while simultaneously
run-unit Y has record 'B' locked and requests a lock on record 'A'.
As neither request can be granted, both run-units are locked in a deadlock condition. A deadlock
can also occur at the area level as well as the record level, through the use of the READY
command.
For both of the above deadlock conditions, automatic IDMS resolution includes the following:
abortion of the run-unit initiating the deadlock:
rollback the database modifications effected during its uncompleted recovery unit;
post an error status of nn29 in the run-unit's IDMS communications block. Any subsequent
attempts by the run-unit to execute an IDMS verb, without re-readying the run-unit, results in an
error status of nn69 being posted in the IDMS communication block.