WRITE program instruction WRITE program instruction Syntax WRITE (lun, record_num ) format_list Function Write a record to an open file, or to any I/O device. For a network device, write a string to an attached and open TCP connection. Usage Considerations Except for the monitor window or console serial port, the device to receive the output must have been attached. If the output is to a disk file, the file must have been opened with an FOPENA or FOPENW instruction. Program execution waits for the write operation to complete unless there is a /N format specifier in the format list. Parameters lun Real-valued expression that identifies the device to be accessed.
(See the ATTACH instruction for a description of unit numbers.) record_num Optional real-valued expression that represents the number of the record to be written. This should be 0 (the default value) to write the next sequential record. If the value is not zero, the record is written in random-access mode (which requires that the records all have the same length). In random-access mode, records are numbered from one (to a maximum of 16,777,216). When accessing the TCP device with a server program, this parameter is an optional real value, variable, or expression (interpreted as an integer) that defines the client handle. For more information, refer to documentation for the READ instruction.
format_list Consists of a list of output variables, string expressions, and format specifiers used to create the output record. The format list is processed exactly like an output specification for the TYPE instruction. When accessing the TCP device, you can include the /N specifier to prevent the eV+ system from waiting for a write acknowledgment. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 573