Op Code (Hex) | Extender | Operand 1 | Operand 2 | Operand 3 | Operand [4-5] |
---|---|---|---|---|---|
CVTMC 10AB |
| Receiver | Controls | Source |
|
| |||||
CVTMCB 1CAB | Branch options | Receiver | Controls | Source | Branch targets |
| |||||
CVTMCI 18AB | Indicator options | Receiver | Controls | Source | Indicator targets |
Operand 2: Character(6) variable scalar.
Operand 3: Character scalar.
Operand 4-5:
Bound program access | ||||||
---|---|---|---|---|---|---|
The return_code will be set as follows:
The receiver, controls and source parameters correspond to operands 1, 2 and 3 on the CVTMC operation. The receiver_length and source_length parameters contain the length, in bytes, of the receiver and source strings. They are expected to contain values between 1 and 32,767. The return_code parameter is used to provide support for the branch and indicator forms of the CVTMC operation. The user must specify code to process the return_code and perform the desired branching or indicator setting. |
This instruction converts a character string from the MRJE (MULTI-LEAVING remote job entry) compressed format to character format. The operation converts the source (operand 3) from the MRJE compressed format to character format under control of the controls (operand 2) and places the results in the receiver (operand 1).
The source and receiver operands must both be character strings. The source operand cannot be specified as either a signed or unsigned immediate value.
The controls operand must be a character scalar
that specifies additional
information to be used to
control the conversion operation. It must be at least 6
bytes in length and have the following format:
Offset | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Dec | Hex |
| Field Name |
| Data Type and Length | ||||||||
0 | 0 |
| Controls operand |
| Char(6) | ||||||||
0 | 0 |
| Receiver offset |
| Bin(2) | ||||||||
2 | 2 |
| Source offset |
| Bin(2) | ||||||||
4 | 4 |
| Algorithm modifier |
| Char(1) | ||||||||
5 | 5 |
| Receiver record length |
| Char(1) | ||||||||
6 | 6 |
| --- End --- |
|
|
The algorithm modifier has the following valid values:
Only the first 6 bytes of the controls operand are used. Any excess bytes are ignored.
The operation begins by accessing the bytes of the source operand at the location specified by the source offset. This is assumed to be the start of a record. The bytes of the records in the source operand are converted into the receiver operand at the location specified by the receiver offset according to the following algorithm.
The first byte of the source record is considered to be an RCB (record control byte) that is to be ignored during conversion.
The second byte of the source record is considered to be an SRCB. If an algorithm modifier of value hex 00 was specified, the SRCB is ignored. If an algorithm modifier of value hex 01 was specified, the SRCB is copied into the receiver.
The strings to be built in the receiver record are described in the source after the SRCB by one or more SCBs (string control bytes).
The format of the SCBs in the source are as follows:
o k l jjjjj
The bit meanings are:
Bit | Value | Meaning | |
---|---|---|---|
o | 0 | End of record;the EOR SCB is hex 00. | |
| 1 | All other SCBs. | |
k | 0 | The string is compressed. | |
| 1 | The string is not compressed. | |
l |
| For k = 0: | |
| 0 | Blanks (hex 40s) have been deleted. | |
| 1 | Nonblank characters have been deleted. The next character in the data stream is the specimen character. | |
|
| For k = 1: | |
|
| This bit is part of the length field for length of uncompressed data. | |
jjjjj |
| Number of characters that have been deleted if k = 0. The value can be 1-31. | |
ljjjjj |
| Number of characters to the next SCB (no compression) if k=1. The value can be 1-63. | |
|
| The uncompressed (nonidentical bytes) follow the SCB in the data stream. |
A length of 0 encountered in an SCB results in the signaling of a conversion (hex 0C01) exception.
Strings of blanks or nonblank identical characters described in the source record are repeated in the receiver the number of times indicated by the SCB count value.
Strings of nonidentical characters described in the source record are moved into the receiver for the length indicated by the SCB count value.
When an EOR (end of record) SCB (hex 00) is encountered in the source, the receiver is padded with blanks out to the end of the current record.
If the converted form of a source record is larger than the receiver record length, the instruction is terminated by signaling a length conformance (hex 0C08) exception.
If the end of the source operand is not encountered, the operation then continues by reapplying the above algorithm to the next record in the source operand.
If the end of the source operand is encountered (whether or not in conjunction with a record boundary, EOR SCB in the source), the instruction ends with a resultant condition of source exhausted. The receiver offset locates the byte following the last fully converted record in the receiver. The source offset locates the byte following the last source record for which conversion is complete. The value of the remaining bytes in the receiver after the last converted record are unpredictable.
If the converted form of a record cannot be completely contained in the receiver, the instruction ends with a resultant condition of receiver overrun. The receiver offset locates the byte following the last fully converted record in the receiver. The source offset locates the byte following the last source record for which conversion is complete. The value of the remaining bytes in the receiver after the last converted record is unpredictable.
If the source exhausted and the receiver overrun conditions occur at the same time, the source exhausted condition is recognized first. In this case, the receiver offset may contain a value equal to the length specified for the receiver which causes an exception to be signaled on the next invocation of the instruction. The processing performed for the source exhausted condition provides for this case if the instruction is invoked multiple times with the same controls operand template. When the receiver overrun condition is the resultant condition, the source always contains data that can be converted.
The following are limits that apply to the functions performed by this instruction.
06 Addressing
08 Argument/Parameter
0C Computation
10 Damage Encountered
1C Machine-Dependent
20 Machine Support
22 Object Access
24 Pointer Specification
2C Program Execution
2E Resource Control Limit
32 Scalar Specification
36 Space Management
38 Template Specification
44 Protection Violation