The matread statement reads the specified item from the optionally specified file.var, or if not specified, the default file.var, and stores one attribute per element in the dimensioned array.
matread array.var from {file.var,} ID.exp {then|else statement.block}
If a binary item is read, system(0) is set to 10. The variable string consists of the hexadecimal FID in attribute 1 and the hexadecimal frame in attribute 2.
If the array is defined by a file statement, the file variable is not used.
This example writes the dimensioned array a on the default file, using a as the item-ID. Although there are only five elements in the array, each corresponds to two attributes (separated by attribute marks). Thus, ten total attributes are written.
open ’customer’ to cust.fv dim customer.rec(20) matread customer.rec from cust.fv,item-ID dim a(5) mat a = "xyz":@am:"abc" matwrite a on "a"
() reserved characters, > relational operator, Array references, Array variable, Arrays, begin work statement, Default File Variables, delete() function, extract() function, clearfile statement, dimension statement, File variable, ID expression, locked clause, mat statement, matbuild statement, matparse statement, matread statement, matreadu statement, matwrite statement, matwriteu statement, open statement, readv statement, release statement, ereplace() function, statement blocks, Statements and functions, system() function, then/else statement blocks, u001c user exit, unlock-group command, unlock-item command, write statement, writev statement, writevu statement