T_WNDWRT

Store a text window’s contents in a window library

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall T_WNDWRT(channel, entry_name, window_id, control[, lines_written])

channel

The channel of the window library. (n)

entry_name

The identifier (name) of the text entry in the library (a maximum of 15 characters). (a)

window_id

The ID of the text window to process. (n)

control

One of the following processing controls on entry: D_CREATE to create a new entry and generate an error if it already exists or D_REPLACE to create a new entry and replace any existing entry. (n)

lines_written

(optional) The number of lines written. (n)

T_WNDWRT stores the data within a text window as a text entry in a window library. This subroutine obtains data using one or more calls to T_GETLIN and writes that data out to the library by calling T_TXTWRT.

Upon exit, control is returned with a value of zero if the operation is completed successfully, or D_EXISTS if control was set to D_CREATE on entry and the text entry already exists. D_EXISTS is a negative number, therefore you can test for an error condition by checking whether control is less than zero.

This example takes the text from txtid, makes it into a text entry, and stores it as “menuhlp” in the window library opened on libchn.

ctrl = D_CREATE
xcall t_wndwrt(libchn, "menuhlp", txtid, ctrl, numlines)