Changing the contents of a field: FLD/CHANGE
To indicate to IMS that you want to change the
contents of a particular field, use an FSA, just as you do in a FLD/VERIFY
call.
The difference is in the operators that you can specify and the FSA status codes that IMS can return to you after the call. To use
FLD/CHANGE
:
- You specify the name of the field that you want to change in the first field of the FSA (Field Name).
- You specify an operator in the third field of the FSA (Operator), which indicates to IMS how you want to change that field.
- You specify the value that IMS must use to change the field in the last area of the FSA (Field Value).
By specifying different operators in a FLD/CHANGE
call, you change the field in
the database in these ways:
- Add the value supplied in the FSA to the value in the field.
- Subtract the value supplied in the FSA from the value in the field.
- Set the value in the database field to the value supplied in the FSA.
You code these operators in the FSA with these symbols:
- To add: +
- To subtract: -
- To set the field equal to the new value: =
You can add and subtract values only when the field in the database contains arithmetic (packed-decimal, binary-fullword, or binary-halfword) data.
FLD/CHANGE
FSA are: - A
- Invalid operation; for example, you specified the + operator for a field that contains character data.
- B
- Invalid data length. The data you supplied in the FSA is not the length that is defined for that field in the DBD.
- C
- You attempted to change the key field in the segment. Changing the key field is not allowed.
- E
- Invalid data in the FSA. The data that you supplied in the FSA is not the type of data that is defined for this field in the DBD.
- F
- You tried to change an unowned segment. This status code applies only to related MSDBs.
- G
- An arithmetic overflow occurred when you changed the data field.
- H
- The requested field was not found in the segment.
If failures occur during processing of the FLD call, IMS reprocesses the call only if the failures are caused by deadlocks or verification errors. For other types of failures, abend U0819 is issued.