UNSPEC returns a bit string that is the internal coded form of x.
|
The UNSPEC built-in function is subject to the following rules:
The length of the returned bit string depends on the attributes of x, as shown in Table 63.
| Bit-String length | Attribute of x |
|---|---|
| 8 |
SIGNED FIXED BINARY(p,q), 1 <= p <= 7 UNSIGNED FIXED BINARY(p,q), 1 <= p <= 8 ORDINAL SIGNED PRECISION(p), 1 <= p <= 7 ORDINAL UNSIGNED PRECISION(p), 1 <= p <= 8 |
| 16 |
SIGNED FIXED BINARY(p,q), 8 <= p <= 15 UNSIGNED FIXED BINARY(p,q), 9 <= p <= 16 ORDINAL SIGNED PRECISION(p), 8 <= p <= 15 ORDINAL UNSIGNED PRECISION(p), 9 <= p <= 16 |
| 32 |
ENTRY LIMITED SIGNED FIXED BINARY(p,q), 16 <= p <= 31 UNSIGNED FIXED BINARY(p,q), 17 <= p <= 32 ORDINAL SIGNED PRECISION(p), 16 <= p <= 31 ORDINAL UNSIGNED PRECISION(p), 17 <= p<= 32 FLOAT BINARY(p), 1 <= p <= 21 FLOAT DECIMAL(p), 1 <= p <= 6 if not DFP FLOAT DECIMAL(p), 1 <= p <= 7 if DFP OFFSET FILE constant or variable POINTER HANDLE |
| 64 |
SIGNED FIXED BINARY(p), 31 < p UNSIGNED FIXED BINARY(p), 32 < p FLOAT BINARY(p), 21 < p < 53 FLOAT DECIMAL(p), 7 <= p <= 16 if not DFP FLOAT DECIMAL(p), 8 <= p <= 16 if DFP LABEL constant or variable ENTRY constant or variable |
| 128 |
FLOAT BINARY(p), 54 <= p FLOAT DECIMAL(p), 17 <= p TASK |
| n | BIT(n) |
| 8*n | CHARACTER(n)PICTURE (with character-string-value length of n) |
| 16*n | GRAPHIC(n)WIDECHAR(n) |
| 16+n | BIT(n) VARYING where n is the maximum length of x |
| 16+(8*n) | CHARACTER(n) VARYING where n is the maximum length of x |
| 8+(8*n) | CHARACTER(n) VARYINGZ where n is the maximum length of x |
| 16+(16*n) | GRAPHIC(n) VARYING where n is the maximum length of xWIDECHAR(n) VARYING where n is the maximum length of x |
| 16+(16*n) | GRAPHIC(n) VARYINGZ where n is the maximum length of xWIDECHAR(n) VARYINGZ where n is the maximum length of x |
| 8*(n+16) | AREA (n) |
| 8*FLOOR(n) |
FIXED DECIMAL (p,q) where n = (p+2)/2 |
Alignment and storage requirements for program-control data can vary across supported systems.
If x is a varying-length string, its two-byte prefix is included in the returned bit string. If x is an area, the returned value includes the control information.