Test and Replace Characters (TSTRPLC)


Op Code (Hex) Operand 1 Operand 2

10A2 Receiver Replacement

Operand 1: Character variable scalar.

Operand 2: Character scalar.

Description  The character string value represented by operand 1 is tested byte by byte from left to right. Until a byte with a value in the range of hex F1 to hex F9 (inclusive) is found, each byte that has a value outside that range is assigned a byte value equal to the leftmost byte of operand 2. Thus any byte to the left of the leftmost nonzero zoned decimal data value is replaced with the leftmost byte value of operand 2. Both operands must be character strings. Only the first character of the replacement string is used in the operation.

The operation stops when the first nonzero zoned decimal digit is found or when all characters of the receiver operand have been replaced.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

10 Damage Encountered

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2E Resource Control Limit

36 Space Management

44 Protection Violation