Copy String to Field (33)
|
Top
Previous
Next
|
The Copy String to Field 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.
Prerequisite Calls
Connect Presentation Space (1)
Call Parameters
|
Standard Interface Enhanced Interface
|
Function Number
|
Must be 33
|
Data String
|
String containing the data to be transferred to a target field in the host presentation space.
|
Length
|
Length, in number of bytes, of the source data string. Overridden if in EOT mode.
|
PS 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.
|
Return Parameters
Return Code
|
Explanation
|
0
|
The Copy String to Field 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).
|
6
|
Copy was completed, but data is truncated.
|
7
|
The host presentation space position is not valid.
|
9
|
A system error was encountered.
|
24
|
Unformatted host presentation space.
|
Remarks
1. | The Copy String to Field function is affected by the following options: |
2. | The string to be transferred is specified with the calling data string 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 Set Session Parameters (9) function. |
• | When the number specified in the length 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.
3. | The keyboard mnemonics (see Send Key (3) function) cannot be sent using the Copy String to Field function. |
4. | The first byte of the data to be transferred is always placed at the beginning of the field that contains the specified PS position. |
5. | DBCS Only: Double-byte characters can be included as a part of the string. |
|