Specifies a field or group of contiguous fields.
For the purposes of IDMSRSTT, a group of contiguous fields, which stays together as a group and undergoes changes as a group, can be treated as a single field.
See the following expanded parameters.
Identifies the field as occurring more than once in the restructured record.
The number of occurrences of the field, as defined by an OCCURS clause for the field in the new schema.
For a contiguous group of fields, they must all be defined by identical OCCURS clauses in the new schema.
Indicates that the field is defined by an OCCURS DEPENDING ON clause in the new schema.
For a contiguous group of fields, they must all be defined by identical OCCURS DEPENDING ON clauses in the new schema.
Specifies that all data items in the original record are duplicated in the new record, with no additions, deletions, or changes and the control length of the record is not being changed. The control length of a record can change if a set is being changed from sorted to unsorted, unsorted to sorted, or if a sorted set, index key, or CALC key is being added or removed from the record.
For previously existing fields only.
Specifies the beginning location of the field in the original record.
For new fields only.
Specifies the initial value of the new field, expressed as an Assembler constant.
See "Usage" in this section.
Specifies the beginning location of the field in the restructured record.
Specifies the length, in bytes, of the field.
For a field that occurs more than once, field-length specifies the length of a single occurrence.
Specifies that the field is a new field being added to the restructured record.
Specifies that the field is a control field (CALC key, sort key, or index key). This parameter can be used for any type of record, but must be specified if ALL is not specified, control fields exist within the record, and the record is:
If specified, CTRL need only be included on the last control field within the record. If you choose, you can specify it on all control fields.
Usage
Contiguous fields
If a contiguous group of fields remains contiguous and internally unchanged in all occurrences, it can be treated as if it were a single field. Therefore, field-length, old-displacement, and new-displacement can refer to the entire group.
If any part of the group is changed, or occurring multiply without maintaining the same relationship with the rest of the group, then it must be treated separately.
Accounting for all data fields
The IDMSRSTT FIELD statements you code for a record must account for all the data fields in the record:
Calculating data field positions
The first byte of data in a record is at location 1. When calculating field positions for variable-length records, do not count the 4-byte variable-length indicator maintained at the beginning of the data portion.
Specifying new field values
The value for new-field-value is expressed as an Assembler constant (for example, CL2' ', indicating a 2-byte field initialized to spaces).
For new fields that have not been assigned an initial value in the new schema, IDMSRSTC supplies an initial value based on the usage specification in the schema, as follows:
|
Usage |
Initial value |
|---|---|
|
DISPLAY, (PIC X), BIT, or POINTER |
CLx' ' |
|
DISPLAY, (PIC 9) |
xCL1'0' |
|
COMP (BINARY) |
XLx'0' |
|
COMP-1 (SHORT-POINT) |
F'0' |
|
COMP-2 (LONG-POINT) |
D'0' |
|
COMP-3 (PACKED) |
PLx'0' |
X is the length, in bytes, of the field.
Expansion to the right of a decimal point
The restructure utility as a general rule cannot expand a field to the right of a decimal point. To do this, the standard procedure would be to first add the needed bytes to the left of the field. After the RESTRUCTURE has been performed, a user-written program must modify each affected record by multiplying the expanded fields by the proper factor to realign the decimal point to the new position.
|
Copyright © 2014 CA.
All rights reserved.
|
|