copyStringToField

Top  Previous  Next

 

The copyStringToField function transfers a string of characters into a specified field in the host-connected presentation space. This function can be used only in a field-formatted host presentation space.

 

3270

5250

Yes

Yes

 

 

Prerequisite Calls

 

connectPresentationSpace

 

 

Call Parameters

 

Parameter name

Explanation

input

String containing the data to be transferred to a target field in the host presentation space.

position

Identifies the target field. This can be the PS position of any byte within the target field. Copy always starts at the beginning of the field.

params

An object containing a subset of Session Options parameters, which values will take precedence on 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.

 

 

Return Code

 

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

 

Return Code

Explanation

0

The copyStringToField function was successful.

1

Your program is not connected to a host session.

2

Parameter error or zero length for copy.

5

The target field was protected or inhibited, or incorrect data was sent to the target field (such as a field attribute).

7

The host presentation space is not valid.

24

Unformatted host presentation space.

28

Field length of 0 bytes.

 

Remarks

 

1.This function is equivalent to HLLAPI Function Number 33.
2.The copyStringToField function is affected by the following session options: STRLEN/STREOT, EOT, EAB/NOEAB, XLATE/NOXLATE, PUTEAB/NOPUTEAB.
3.The string to be transferred is specified with the calling 'input' parameter. The string ends when one of these three conditions is encountered:

 - When an end-of-text (EOT) delimiter is encountered in the string if EOT mode was selected using the 'params' parameter.

 - When the end of the string passed in the 'input' parameter is reached, if not in EOT mode.

 - When an end-of-field is encountered in the field.

 Note: If the field at the end of the host presentation space wraps, wrapping occurs when the end of the presentation space is reached.

4.The keyboard mnemonics (see sendKey function) cannot be sent using the copyStringToField function.
5.The first byte of the data to be transferred is always placed at the beginning of the field that contains the specified PS position.