Previous Topic: COPY ClauseNext Topic: INSERT Instruction of the EDIT Clause


EDIT Clause

Use an EDIT clause within entity-type statements to update comment text and the source statements that comprise modules, processes, and qfiles. The EDIT clause is intended for use in batch mode or with a dial-up device; in full-screen mode, users can employ the online text editor described in Online DDDL Compiler.

Each comment line and source statement has a unique line number by which it can be referenced during editing. The DDDL compiler automatically generates these numbers, incrementing each line by 100 or by the default value defined in the SEQUENCE clause of the SET OPTIONS statement. Unless overridden in a SEQUENCE instruction (described in this chapter), the default value is referred to as the current increment.

Syntax: EDIT Clause

   ┌─────────────────────────────────────────────────────────────┐
   │                               ┌────────────────────┐        │
►►─▼─ EDIt ──┬─ COMments ───────┬──▼─ edit-instruction ─┴─ QUIT ─┴────────────►◄
             ├─ DEFinition ─────┤
             ├─ comment-key ────┤
             ├─ OLQ header ─────┤
             ├─ CULprit header ─┤
             ├─ REMarks ────────┤
             └─ MODule SOUrce ──┘

Parameters

EDIt

Specifies the object of the edit operation. EDIT and the object of EDIT (for example, EDIT COMMENTS) must be coded on a line by itself.

COMments

Specifies that text associated with the predefined comment key COMMENTS is to be edited.

DEFinition

Specifies that text associated with the predefined comment key DEFINITION is to be edited.

comment-key

Specifies that text associated with a user-defined comment key is to be edited. The specified comment key must exist in the dictionary and must either be abbreviated to one word that does not duplicate a DDDL keyword or be enclosed in quotation marks if it includes embedded blanks or delimiters or duplicates a DDDL keyword.

OLQ header

Specifies that text associated with the predefined comment key OLQ HEADER is to be edited.

CULprit header

Specifies that text associated with the predefined comment key CULPRIT HEADER is to be edited.

REMarks

Specifies that text associated with the predefined comment key REMARKS is to be edited.

MODule SOUrce

Specifies that text associated with the named module, process, or qfile source is to be edited.

edit-instruction

Specifies the edit operation to be performed; valid keywords are INSERT, REPLACE, ERASE, LIST, SEQUENCE, and SHOW. Multiple edit instructions can appear between the EDIT and QUIT keywords; however, a single input line can contain only one edit instruction.

QUIT

Terminates the EDIT clause. This keyword must appear on a separate input line following the last edit instruction. If QUIT is omitted, the DDDL compiler attempts to interpret subsequent DDDL source statements as edit instructions and may incorrectly modify the entity occurrence to which the EDIT statement applies.

Example

The following figure shows an Integrated Data Dictionary Activity List containing EDIT instructions that insert text in the module IDMS-STATUS.

IDMSDDDL nn.n CA, INC. DATE TIME PAGE INTEGRATED DATA DICTIONARY ACTIVITY LIST mm/dd/yy 12393315 0001 0001 SET OPTIONS INPUT COLUMNS ARE 1 THRU 71. 0002 MODIFY MODULE IDMS-STATUS 0003 EDIT MODULE SOURCE 0004 SHOW ON 0005 SEQUENCE 100 0006 LIST FIRST TO LAST 100) ****************************************************************** 200) IDMS-STATUS SECTION. 300) ****************************************************************** 400) IF DB-STATUS-OK GO TO ISABEX. 500) PERFORM IDMS-ABORT. 600) DISPLAY '**************************' 700) ' ABORTING - ' PROGRAM-NAME 800) ', ' ERROR-STATUS 900) ', ' ERROR-RECORD 1000) ' **** RECOVER IDMS ****' 1100) UPON CONSOLE. 1200) DISPLAY 'PROGRAM NAME ------ ' PROGRAM-NAME. 1300) DISPLAY 'ERROR STATUS ------ ' ERROR-STATUS. 1400) DISPLAY 'ERROR RECORD ------ ' ERROR-RECORD. 1500) DISPLAY 'ERROR SET ───────── ' ERROR─SET. 1600) DISPLAY 'ERROR AREA -------- ' ERROR-AREA. 1700) DISPLAY 'LAST GOOD RECORD -- ' RECORD-NAME. 1800) DISPLAY 'LAST GOOD AREA ---- ' AREA-NAME. 1900) DISPLAY 'DML SEQUENCE--------' DML-SEQUENCE. 2000) ROLLBACK. 2100) CALL 'ABORT'. 2200) ISABEX. EXIT. 0007 INSERT 1950 0008 DISPLAY 'DBKEY_______________' DBKEY. 0009 CEND THE FOLLOWING WERE INSERTED: 1950) DISPLAY 'DBKEY_______________' DBKEY. 0010 LIST 1800 TO LAST 1800) DISPLAY 'LAST GOOD AREA ---- ' AREA-NAME. 1900) DISPLAY 'DML SEQUENCE--------' DML-SEQUENCE. 1950) DISPLAY 'DBKEY_______________' DBKEY. 2000) ROLLBACK. 2100) CALL 'ABORT'. 2200) ISABEX. EXIT. 0011 QUIT.

Syntax and parameter descriptions for each of the EDIT instructions follow.