MATWRITEU Statement

The MATWRITEU statement writes the elements of a dimensioned array as attributes of a file item, leaving item locks intact.

Format

MATWRITEU array ON [filevar,] item-ID

Parameter(s)

array

Dimensioned array to write into the file item.

filevar

Variable to which the file was opened. If filevar is not specified, the default file variable is used, which is the file most recently opened without an assigned file variable.

item-ID

An expression evaluating to the item-ID of the item to be written.

Description

The MATWRITEU statement is identical to the MATWRITE statement, except that item locks are not lifted by the MATWRITEU statement.

The SET-WRITE-LOCK system switch controls whether the WRITEU, MATWRITEU, WRITEVU and WRITEFU statements in mvBASIC set an item lock if an item lock is not already set. Refer to the SET-WRITE-LOCK system switch in the Guide to mvBase Files and Accounts for additional information.

Example

In this application, the MATWRITEU statement is used to write the array into the file item EMPLOYEE. The operator, however, may still make changes to the record and update it again, without the danger of concurrent updates.

   .

   .

   .

INFO.ARRAY(ELT) < 7 > = NEW.NUM

MATWRITEU INFO.ARRAY ON EMP.FILE, EMPLOYEE

PRINT "ANY MORE CHANGES TO THE RECORD?

See Also

Statement and Function Reference