CHG control statement

Use a CHG control statement for each standard change made to a segment type.

In addition to the changes performed in a user exit routine, there are two types of standard changes that FABRRELD can do:

  • Move data from the old segment to different locations within the new segment
  • Move literal data to the new segment

Use one CHG control statement for each standard change made to a segment type. CHG control statements do not have to be in a special sequence, but they must immediately follow the affected SEG control statement. You can specify up to 150 CHG control statements for each DB control statement.

Output positions not altered by a CHG control statement contain the corresponding data from the old segment.

0.........1.........2.........3.........4.........5.........6.........7.........8
012345678901234567890123456789012345678901234567890123456789012345678901234567890
 
 CHG       outpos    inpos     length
                     X'xxxxxx...xx'
                     C'character literal...' 
Position
Description
1
Code CHG in the first three bytes to identify this as a CHG control statement. A CHG control statement is used for each change in the structure of the segment type of the previous SEG control statement. This field is required.
11
This required field is the position in the output segment where data is to be moved. To code this field, you must include five decimal digits. Use leading zeros if necessary. The smallest allowable value is 00001. (This is the first byte in the data portion of the segment.)
21
This required field can contain either a literal or a five-digit number. It defines the data that is moved into the appropriate output segment.
5-digit number
This number is the position in the input segment from which data is moved. To code this field, you must include five decimal digits. The smallest allowable value is 00001. This value represents the first byte in the data part of the segment.
literal
The field can also be a left-aligned character or hex literal. It is moved into each appropriate output segment.

Enclose the literal in single quotes. It can use up to 60 bytes. FABRRELD computes the actual length of the literal. Do not specify input position or length. For each DB control statement, the total number of literal bytes cannot exceed 1500.

Hex literals are specified as X'xxxx...' with an even number of hex digits (0-9, A-F) between the single quotes.

Character literals are specified as either C'char...' or 'char...'. If a quote is needed as part of a character literal, specify it as two consecutive quotes.

31
This entry defines the number of bytes to be moved from the input segment to the output segment. Code the field with five decimal digits, using leading zeros, if necessary. 00001 is the smallest allowable value. Do not code this field when you are using a literal.