Copies all or part of the host-connected Presentation Space (PS) into a data string 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 TO STRING function:
The COPY PRESENTATION SPACE TO STRING function translates the characters in the host source 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.
The input PS position is the offset into the host PS. This offset is based on a layout in which the upper-left corner (row 1, column 1) is position 1. The bottom-right corner of the host PS has the highest position number.
The COPY PRESENTATION SPACE TO STRING 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 with bit 0 as the leftmost bit in the byte.
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 of a DBCS character, this byte is copied as a one-byte blank character.
The COPY PRESENTATION SPACE TO STRING 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.
|
Byte 1 | ||
Bit position | Character position | Field attributes position |
0 | Double-byte character | Reserved |
1 | First byte of Double-byte character | Reserved |
2 | SO | Pair of SO/SI exists |
3 | SI | Reserved |
4 | Unusable position | Reserved |
5 | Reserved | SO/SI creation enable |
6 | Reserved | Character attributes exists |
7 | Reserved | Reserved |
Byte 2 | ||
Bit position | Character position | Field attributes position |
0 | Reserved | Left vertical line(field attributes) |
1 | Reserved | Over line(field attributes) |
2 | Reserved | Right vertical line(field attributes) |
3 | Reserved | Under line(field attributes) |
4 | Left vertical line | Left vertical line |
5 | Over line | Over line |
6-7 | Reserved | Reserved |
CONNECT PRESENTATION SPACE (1) function and SET SESSION PARAMETERS (9) function.