Copies the contents of the host presentation space (PS) into a data string that you defined in your HLLAPI application program.
This function requires a prerequisite call to the CONNECT PRESENTATION SPACE (1) function.
hllc (func, apistring, len, ret) int *func; char *apistring; int *len; int *ret;
Supply the following parameters to invoke the COPY PRESENTATION SPACE function:
The COPY PRESENTATION SPACE function translates the characters from the host PS into ASCII format. Attribute bytes and other characters not represented in ASCII are translated into blanks. If you do not want the attribute bytes translated into blanks, use the ATTRB option under the SET SESSION PARAMETERS (9) function.
The EXTENDED ATTRIBUTES BYTES (EAB) option under the SET SESSION PARAMETERS (9) function can be used with this function to return EABs. An EAB is associated with each character on the presentation space and follows each character when this option is used.
The XLATE option is not supported.
If you want to copy only a portion of the host PS, use the COPY PRESENTATION SPACE TO STRING (8) function.
The COPY PRESENTATION SPACE function is affected by the ATTRB/NOATTRB and EAB/NOEAB options. See the command description in SET SESSION PARAMETERS (9) for more information.
The return of attributes by the various COPY (5, 8, and 34) functions is affected by the SET SESSIONS PARAMETERS (9) function. The involved SET SESSION PARAMETERS options have the following effect:
Set Session Parameter | Effect on the COPY Functions |
NOEAB | Attributes are not returned. Only text is copied from the presentation space to the user buffer. |
EAB and NOXLATE | Attributes are returned as defined. |
The returned character attributes are defined. The attribute bit positions are in the format of the leftmost bit in the byte is bit 0.
3270 Field Attributes | |
Bit position | Meaning |
0-1 | Character highlighting 00 Normal 01 Blink 10 Reverse Video 11 Underline |
2-4 | Character color (Color remap may override this color definition.) 000 Default 001 Blue 010 Red 011 Pink 100 Green 101 Turquoise 110 Yellow 111 White |
5-7 | Reserved (not used) |
The EAD option under the SET SESSION PARAMETERS (9) function can be used with this function to return two-byte EADs. An EAD follows each character when this option is used without the EAB option and follows each EAB when it is used with the EAB option.
If a copied multibyte character is larger than two bytes, EAB or EAD of the second byte of the DBCS character in the presentation space is returned for the third byte and after.
If the copy starts at the second byte of a DBCS character or ends at the first byte, this byte is copied as a one-byte blank character.
The COPY PRESENTATION SPACE function is affected by the ATTRB/NOATTRB, EAB/NOEAB, EAD/NOEAD, and the SPACESO/SO/NOSO options. See the command description in SET SESSION PARAMETERS (9) for more information.
Set Session Parameter | Effect on the COPY Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NOEAB and NOEAD | Attributes are not returned. Only text is copied from the presentation space to the user buffer. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
EAB and NOXLATE | Attributes are returned as defined. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
EAD | DBCS attributes are returned as defined. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SPACESO/SO/NOSO | NOSO works as SPACESO. Therefore, the length of returned presentation space is unchanged.
|
CONNECT PRESENTATION SPACE (1) function, COPY PRESENTATION SPACE TO STRING (8) function, SET SESSION PARAMETERS (9) function.