|
|
|
|
The Copy Presentation Space to String function copies the contents of all or part of the current presentation space into a data string defined in your application program. Copied characters are translated to ASCII values before being stored in the data string.
Your application program must be connected to a valid presentation space before issuing the request for this function. Use Connect Presentation Space to connect to a presentation space.
Your application program must pass the following parameters to this function:
Empty data string defined in your application program. It must be large enough to hold the data that will be copied from the presentation space. Presentation Space Sizes, shows the PS sizes for each of the display models.
If the option is set in Set Session Parameters , the string must be twice as long as the number of character positions you want to copy, to allow for the EAB characters.
Number of bytes of data you want to copy from the presentation space (including the additional bytes if the or , or both, options are set-see above).
Position in the presentation space where you want the function to begin copying.
This function returns the following parameters to your application program:
8
String copied from the presentation space.
The number of characters in the returned data string. If the field contained SO/SI characters and the option is set in Set Session Parameters, this will be less than the supplied data length because the SO/SI characters are not included in the returned string.
The valid return codes are:
Function was successful; session is active and keyboard is unlocked. Contents of host presentation space were copied to your program.
Your application program is not connected to a valid presentation space.
The data_length parameter was not valid (either zero or greater than the PS size). No data was copied.
Copy was successful, but presentation space is waiting for host response.
Copy was successful, but keyboard is locked.
Your program specified a presentation space position that was zero or greater than the PS size.
System error occurred.
This function is affected by the following options of the Set Session Parameters function:
Causes field attribute bytes to be included unchanged in the returned string.
Causes field attribute bytes to be returned as blanks.
Copies each character from the presentation space followed by its extended attribute byte.
Does not copy attribute bytes.
If the option is set, causes the copied extended attribute bytes to be translated into CGA format.
If the option is set, causes extended attribute bytes to be copied without translation.
For more information, see Set Session Parameters.
Usage and restrictions are:
Use this function to copy a portion of the presentation space. Use the Copy Presentation Space function to copy the entire presentation space.
If this function encounters the end of the presentation space while copying data, the copying stops and the return code is set to HARC_SUCCESS. If you need to copy from a field that wraps around the end of the presentation space, use the Copy Field to String function instead.
The predefined data string in your application program must be large enough to hold all of the information copied from the presentation space.
If the option has been set in Set Session Parameters, the length of the target string must allow for the additional EAB characters as well as the data characters. If extended attributes are not used by the host program, the EAB characters will be returned as nulls (0x00).
If the option is set, this function translates attribute bytes to CGA format.
This function automatically translates the characters in the host presentation space into ASCII.
|
|
|
|
|