COMWRITE


 

The COMWRITE instruction transmits data to the communications device. The instruction uses the following format:

 

 

[label]

COMWRITE

{comfile};{comlist}[;]

 

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:

  1. Individual items within {comlist} are separated with commas. The list may be continued on additional lines by ending each continued line with a colon (:).

  2. The {comfile} variable specifies the output device that must have been previously opened via the COMOPEN instruction.

  3. The OVER flag is set if a time-out occurs during the COMWRITE operation.

  4. The ZERO flag is set if all characters are transmitted.

  5. {comlist} character variables are processed as follows:

  6. 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.

  7. Under Windows, it is not possible for the user to interrupt a time-out.

  8. When using a Linux runtime where the {comfile} is opened for a file/device, the following write controls are not used:

  9. a) *T timeout.

    b) *DTR and *RTS write controls.

 

 

See Also: COMWRITE List Controls, COMREAD, Communication I/O Instructions

 



PL/B Language Reference COMSTAT HTTP