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.
|
|