IDMS COBOL STANDARD
IDMS COBOL Standard -- Version 1.0
09/03/97
Table of Contents
IDMS Cobol Guidelines
PURPOSE
To establish uniform IDMS COBOL coding techniques.
SCOPE
These coding standards apply to all IDMS COBOL programs. Exceptions
may be made for vendor delivered programs.
DOCUMENTATION REQUIREMENTS
IDMS-DC: Programs must be entered into the system generation (SYSGEN)
parameters by the DBA.
OVERVIEW
The IDMS COBOL standards are a supplement to the general COBOL
Programming Standard. Both should be used and followed in order to
ensure efficient coding and to simplify future program modification. These
standards are applicable to both IDMS-DB and IDMS-DC unless otherwise noted.
IDENTIFICATION DIVISION
Note: This topic does NOT apply to NEW programs.
-
Each program must contain a modification history (change log) within the
Identification Division.
-
Each entry in the modification history must contain the:
-
date of the modification
-
the programmer's initials
-
a brief description of the modification, and
-
ENDEVOR Change Control ID (CCID).
IDMS-CONTROL SECTION
-
An IDMS-CONTROL section is required in the ENVIRONMENT DIVISION to establish
operating mode, debug sequence, and variable storage allocation.
-
Protocol Statement
-
Specify the DEBUG option in the protocol statement. This provides DML sequence
numbers on each IDMS statement.
-
IDMS-DC: The program must specify an IDMS-DC operating mode.
-
IDMS-RECORDS Statement: Specify the MANUAL option of the IDMS-RECORDS statement
so that records can be copied in as needed from the IDD.
-
Note: The "AUTOSTATUS" protocol handles status checking
automatically but allows for the testing of only one non-zero return code.
SCHEMA SECTION
Do not use the global subschema(s) without approval of the DBA.
If a global subschema is used, the DB statement must be followed by a comment:
SUBSCHEMA APPROVED BY DATE
IAZSS001 D.Maher 03/15/91
STANDARD COPIES
-
Use the "COPY IDMS SUBSCHEMA-CONTROL", "COPY IDMS SUBSCHEMA-CTRL", and
the "COPY IDMS SUBSCHEMA-NAMES" statements to copy in appropriate subschema
components.
-
Use the "COPY IDMS SUBSCHEMA-BINDS" statements. The DML preprocessor will
insert appropriate record/map bind statements for records found in the
programs DATA DIVISION.
-
Use the "COPY IDMS IDMS-STATUS" statement to utilize the standard abend
process.
DATA BASE SWEEPS
IDMS-DC: Do not use an area sweep in an IDMS-DC COBOL program.
FINISH COMMAND
IDMS-DB: A "FINISH" should always be issued before terminating
a program. Issue the FINISH as soon as database I/O is completed to free-up
resources and to prevent potential time-outs.
DC RETURN COMMAND
IDMS-DC: A "DC RETURN" should always be issued before terminating
a program to return control to a program at the next higher level within
a task.
STATUS CODE CHECK
IDMS-STATUS (a routine that checks for non-zero database return
codes) should be processed after every DML verb with the exception of "ROLLBACK".
Errors can be immediately identified and linked to the appropriate verb.
Return to: Systems
Development Home Page
Return to: UMS Home Page
This content was last updated on April 27, 1998
This page was last updated on September 3, 2004
Comments to: Standards Working
Group
Cobol Standards authored by UMS Standards Working Group