copyPresentationSpaceToString

Top  Previous  Next

 

The copyPresentationSpaceToString function is used to copy all or part of the host-connected presentation space into a data string that you define in your hllapi.js application program.

The input PS position is the offset into the host presentation space. This offset is based on a layout in which the upper-left corner (row 1/column 1) is location 1 and the bottom-right corner is 3564, which is the maximum screen size for the host presentation space. The value of PS Position + (Length - 1) cannot exceed the configured size of your host presentation space.

The copyPresentationSpaceToString function translates the characters in the host source presentation space into ASCII. Attribute bytes and other characters not represented in ASCII normally are translated into blanks. If you do not want the attribute bytes translated into blanks, you can override this translation with the ATTRB option for the 'attrb' field in the 'params' parameter.

 

3270

5250

Yes

Yes

 

 

Prerequisite Calls

 

connectPresentationSpace

 

 

Call Parameters

 

Parameter name

Explanation

pos

Position within the host presentation space of the first byte in your target data string.

len

Length of the target data string.

params

An object containing a subset of Session Options parameters, which values will take precedence over the defaults for the execution context of this function.

 

 

Return Properties

 

Property name

Explanation

returnCode

A numeric code indicating the execution status of the function. Please refer to the Return Code table below for all possible values.

data

Contents of the host presentation space.

length

The length of the data copied.

 

 

Return Code

 

The following values are defined for the 'returnCode' property:

 

Return Code

Explanation

0

The host presentation space contents were copied to the application program. The target presentation space was active and the keyboard was unlocked.

1

Your program is not connected to a host session.

2

An error was made in specifying string length, or the sum of (len - 1) + pos is greater than the size of the connected host presentation space.

4

The host presentation space contents were copied. The connected host presentation space was waiting for host response.

5

The host presentation space was copied. The keyboard was locked.

 

Remarks

 

1.This function is equivalent to HLLAPI Function Number 8.
2.An EAB can be returned when the EAB option is included in 'params' parameter. EAB is related to each character inn the presentation space and is returned following each character.
3.The copyPresentationSpaceToString function is affected by the following session options: ATTRB/NOATTRB/NULLATTRB, EAB/NOEAB, XLATE/NOXLATE, BLANK/NOBLANK, DISPLAY/NODISPLAY.