Please enable JavaScript to view this site.

A-Shell Reference

WRITE #ch, recexpr

WRITEL #ch, recexpr

The difference between WRITE and WRITEL has to do with record locking and only applies when LOKSER is enabled. WRITE writes a record and unlocks it afterwards so that it can be modified by another process. It assumes that the record was previously read with READL. WRITEL establishes a lock first and then writes. It is used for writing records that were not previously locked.

Parameters

recexpr is an expression containing the data to write. Typically it is the same record variable or structure used in the READ statement, but could technically be any expression, provided its length does not exceed the record size specified in the OPEN statement. If the length of recexpr is less than the record size, the remaining bytes in the target record on disk will not be modified.

Comments

See the READstatement topic for comments regarding the record number which apply here as they do for READ.

Example

See READ.

See Also