COMWRITE
The COMWRITE instruction transmits data to the communications device. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
comfile
Required. A previously defined and opened COMFILE definition.
comlist
Required. A list of Character String Variables, individual character string Array elements, entire character string array, VARLIST of character strings, or COMWRITE List Controls.
;
Optional. A semicolon indicating Partial I/O.
Flags Affected: OVER, ZERO
Note the following:
Individual items within {comlist} are separated with commas. The list may be continued on additional lines by ending each continued line with a colon (:).
The {comfile} variable specifies the output device that must have been previously opened via the COMOPEN instruction.
The OVER flag is set if a time-out occurs during the COMWRITE operation.
The ZERO flag is set if all characters are transmitted.
{comlist} character variables are processed as follows:
The contents from the first physical character through Length Pointer are transmitted. Blanks are transmitted for any positions following the Length Pointer through the Physical Length, unless modified with the *LL or *SL list controls.
If an item within the list is a character string ARRAY and no specific array element has been specified, every array element is used.
If a semi-colon (;) terminates the list, data from the {comlist} variables is transferred to the output buffer and the buffered data is not transmitted. When a COMWRITE is executed without a (;) terminator, the output buffer data is transmitted. An IO error occurs if a COMWRITE overflows the output buffer.
Under Windows, it is not possible for the user to interrupt a time-out.
When using a Linux runtime where the {comfile} is opened for a file/device, the following write controls are not used:
a) *T timeout.
b) *DTR and *RTS write controls.
See Also: COMWRITE List Controls, COMREAD, Communication I/O Instructions
![]() |