These substatements make changes to text members. They are read from the statement stream until the MODIFY-ELEMENT substatement END-MODIFY is encountered.
Overview of MODIFY-ELEMENT substatements
These substatements may be used only for textual members.
MODIFY-ELEMENT substatement | Function |
ADD-RECORD | Inserts records |
END-MODIFY | Concludes the modifications |
REMOVE-RECORD | Removes records |
Notes
Standard SDF statements are also permitted as MODIFY-ELEMENT substatements (see "SDF standard statements for LMS").
Only member records with lengths ≤ 251 are processed. Longer records will be truncated. In this case, LMS issues a warning.
Definition of record identification for textual members
Record identification may be a record number or a record ID.
Record | The record number indicates the relative position of the member record in |
number: | relation to the beginning of the member. If the record number specified is |
Record ID: | The location and length of the record ID are specified by means of the |
Record numbers and record IDs may be mixed within substatements. In substatements and data records, they must always be specified in ascending order.
If an error is detected in interactive mode, the correction must be terminated with END-MODIFY and then restarted. After an ADD-RECORD substatement, an *END must also be entered.
ADD-RECORD
The MODIFY-ELEMENT substatement ADD-RECORD inserts the records following the statement at the specified position. The records to be inserted must be concluded by an *END record.
ADD-RECORD |
RECORD-ID = *NONE / <integer 0..99999999> / <c-string 1..16 with-low> |
RECORD-ID = *NONE / <integer 0..99999999> / <c-string 1..16 with-low>Specifies the data record to be added.
RECORD-ID = *NONE
If the INPUT-RECORD-ID operand of the MODIFY-ELEMENT statement is set to a value other than *NONE, the data records following the ADD-RECORD substatement are inserted in the member being modified in accordance with their record IDs.
If a specified record ID designates a record which already exists, the data record is written over the existing record. If no record with the specified record ID yet exists, the data record is inserted in front of the first record with a higher record ID. If INPUT-RECORD-ID=*NONE is set or no record ID is specified for a data record, the record is inserted at the current position.
RECORD-ID = <integer 0..99999999> / <c-string 1..16 with-low>
Specifies the member position after which the data records following the statement are to be inserted. If the specified record number or record ID does not exist, the data records are each inserted in front of the first record with a higher record number/record ID.
Statement return code
(SC2) | Maincode | Meaning |
0 | CMD0001 | No error |
END-MODIFY
Each sequence of MODIFY-ELEMENT substatements is concluded by an END-MODIFY substatement.
END-MODIFY |
This substatement has no operands.
Statement return code
(SC2) | SC1 | Maincode | Meaning |
| 0 | CMD0001 | No error |
REMOVE-RECORD
The MODIFY-ELEMENT substatement REMOVE-RECORD deletes the specified record or record area from the member.
REMOVE-RECORD | ||||||||||||||||
|
RECORD-ID = <integer 0..99999999> / <c-string 1..16 with-low> / *RANGE(...) Record number or record ID of the record to be deleted.
RECORD-ID = *RANGE(...)
Specifies the record area to be deleted.
FROM = <integer 0..99999999> / <c-string 1..16 with-low>
Specifies the first record number or record ID of the area which is to be deleted.
TO = <integer 0..99999999> / <c-string 1..16 with-low>
Specifies the last record number or record ID of the area which is to be deleted.
Statement return code
(SC2) | Maincode | Meaning |
0 | CMD0001 | No error |