Op Code (Hex) | Operand 1 | Operand 2 | Operand 3 | |
---|---|---|---|---|
1053 | Receiver | Source | Pad |
Operand 2: Data-pointer-defined character scalar.
Operand 3: Character(3) scalar or null.
Bound program access |
---|
|
The extended character string value of the source operand is copied to the receiver operand.
The operation is performed at the length of the receiver operand. If the source operand is shorter than the receiver, the source operand is copied to the leftmost bytes of the receiver and the excess bytes of the receiver are assigned the appropriate value from the pad operand.
The pad operand, operand 3, is three bytes
in length and has the
following format:
Offset | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Dec | Hex |
| Field Name |
| Data Type and Length | ||||||||
0 | 0 |
| Pad operand |
| Char(3) | ||||||||
0 | 0 |
| Single byte pad value |
| Char(1) | ||||||||
1 | 1 |
| Double byte pad value |
| Char(2) | ||||||||
3 | 3 |
| --- End --- |
|
|
If the pad operand is more than three bytes in length, only its leftmost three bytes are used. Specifying a null pad operand results in default pad values of hex 40, for single byte, and hex 4040, for double byte, being used. The single byte pad value and the first byte of the double byte pad value cannot be either a shift out control character (SO = hex 0E) value or a shift in control character (SI = hex 0F) value. Specification of such an invalid value results in the signaling of the scalar value invalid (hex 3203) exception.
Operands 1 and 2 must be specified as data pointers which define either a simple (single byte) character data field or one of the extended (double byte) character data fields.
Support for usage of a data pointer defining an extended character scalar value is limited to this instruction. Usage of such a data pointer defined value on any other instruction is not supported and results in the signaling of the scalar type invalid (hex 3201) exception.
For more information on support for extended character data fields, refer to the Set Data Pointer Attributes (SETDPAT) and Materialize Pointer (MATPTR) instructions.
Four data types are supported for data pointer definition of extended (double byte) character fields, OPEN, EITHER, ONLYNS and ONLYS. Except for ONLYNS, the double byte character data must be surrounded by a shift out control character (SO = hex 0E) and a shift in control character (SI = hex 0F).
Specifying an extended character value which violates the above restrictions results in the signaling of the invalid extended character data (hex 0C12) exception.
The valid copy operations which can be specified on this instruction
are the following:
Table 1. Valid copy operations for CPYECLAP
| Op1 1 | |||
---|---|---|---|---|
Op 2 | Onlyns | Onlys | Open | Either |
Onlyns | yes | yes | yes | yes |
Onlys | yes | yes | yes | yes |
Open | no | no | yes | no |
Either | no | no | yes | yes |
Specifying a copy operation other than the valid operations defined above results in the signaling of the invalid extended character operation (hex 0C13) exception.
When the copy operation is for a source of type ONLYNS (no SO/SI delimiters) being copied to a receiver which is not ONLYNS, SO and SI delimiters are implicitly added around the source value as part of the copy operation.
When the source value is longer than can be contained in the receiver, truncation is necessary and the following truncation rules apply:
When the source value is shorter than that which can be contained in the receiver, padding is necessary. One of three types of padding is performed:
The type of padding performed is determined by the type of operands involved in the operation:
The above padding rules cover all the operand combinations which are allowed on the instruction. A complete understanding of the operand combinations allowed (prior diagram), and the values which can be contained in the different operand types is necessary to appreciate that these rules do cover all the valid combinations.
06 Addressing
08 Argument/Parameter
0C Computation
10 Damage Encountered
1C Machine-Dependent
20 Machine Support
22 Object Access
24 Pointer Specification
2E Resource Control Limit
32 Scalar Specification
36 Space Management
44 Protection Violation