COMPARE DATA statement
The COMPARE DATA statement is optional. It compares the segment returned by IMS to the data in the statement to verify that the correct segment was retrieved.
The following table gives the format of the COMPARE DATA statement.
Column | Function | Code | Description |
---|---|---|---|
1 | Identifies control statement | E | COMPARE statement. |
2 | Reserved | b | |
3 | Length comparison option | b | For fixed-length segments or if the LL field of the segment is not included in the comparison; only the data is compared. |
L | The length in columns 5-8 is converted to binary and compared against the LL field of the segment. | ||
4 | Segment length option | b | |
V | For a variable-length segment only, or for the first variable-length segment of multiple variable-length segments in a path call, or for a concatenated logical-child–logical-parent segment. | ||
M | For the second or subsequent variable-length segment of a path call, or for a concatenated logical-child–logical-parent segment. | ||
P | For fixed-length segments in path calls. | ||
Z | For message segment. | ||
5-8 | Comparison length | nnnn | Length to be used for comparison. (Required for length options V, M, and P if L is coded in column 3.) |
9 | Reserved | b | |
10-13 | Identifies type of statement | DATA | Required for the first I/O COMPARE statement and the first statement of a new segment if data from previous I/O COMPARE statement is not continued. |
14-15 | Reserved | b | |
16-71 | String of data | Data against which the segment in the I/O area is to be compared. | |
72 | Continuation column | b | If blank, data is NOT continued. |
x | If not blank, data will be continued, starting in columns 16-71 of the subsequent statements for a maximum of 3840 bytes. | ||
73-80 | Sequence indication | nnnnnnnn | For SYSIN2 statement override. |
Notes:
|