File Buffers (PQN)

The following material applies to PQN Procs only.

Proc has 47 file buffers (from 1 to 47) that are used to contain items read from or written to a file. File buffers 19 and 20 are reserved for use by system Procs.

Data within a file buffer is divided into attributes separated by attribute marks.

If you reference an attribute beyond the last existing attribute, the required additional attributes (null values) are created.

File buffers are referenced with an ampersand (&), followed by the file buffer number, a period (.) and a numeric value, representing the attribute. For example:

File buffer 4

000 TEST1
001 ABC
002 DEF
003 GHI
004 JKL

&4.2 references the second attribute in file buffer 4 (that is, DEF).

File buffers can be referenced only after they have been cleared or opened.

Attribute 0 contains the item-id. Thus, &4.0 references the item-id of the item in file buffer 4. In the example above, TEST1 is the item-id.

The item-id is a null value until a read command, such as F-READ, is executed or until the item-id is moved into attribute 0 of the file buffer.

'Fast' Buffer

The FB command reads an item from a file into a 'fast' buffer without first opening the file. There is only one fast buffer. Attributes within it are referenced as &0.a, where a is the attribute number. Note that this 'scratch' buffer can be used apart from the FB command. Previous fast buffer contents are overwritten by each subsequent FB command. The P command also destroys the contents of the fast buffer.

Note

For backwards compatibility, the old syntax (&a) is still supported.