7 - chain to next "" file.

Usage:

mme     gemore
zero    7,BUFPTR
tra     EOF_RTN
tra     NORMAL_RTN
tra     NOALLOC_RTN

Where:

BUFPTR
points to a 355-word buffer allocated by the user in the user program.
EOF_RTN
NORMAL_RTN
NOALLOC_RTN
are described below.
Q register
should contain the following before the call.
Bits 0-17
the address of a 40-word work area in the user program.
Bits 18-23
zero.
Bits 24-35
contain the file code that should be assigned to the next "" file.

Description:

In the standard documentation, this version of MME GEMORE is said to request file concatenation. What it actually does is better described as "chaining".

An activity using this call should have one file with the file code that is given to the Q register and zero or more files with a special file code consisting of two double quotes (""). When you call this version of MME GEMORE, it will close and deallocate the file that is currently associated with the file code in the Q register, and will instead associate the file code with the next "" file. In this way, successive calls to MME GEMORE will move through the chain of "" files, associating the file code with each file in its turn.

When this version of MME GEMORE successfully switches the file code to the next file in the chain, it returns to the location that contains

tra     NORMAL_RTN
Normal file operations may proceed on the new file using the old file code.

If MME GEMORE has reached the end of the chain and can't switch to another file, it returns to the location that contains

tra     EOF_RTN
We call this EOF because it is the end of the file chain.

If MME GEMORE tries to switch to the next file in the chain but cannot because the next file has not been pre-allocated, it returns to the location that contains

tra     NOALLOC_RTN
In this case, the first two words of the work area indicated in the upper half of the Q register will contain
zero    4,BUFPTR
vfd     18/BLOCK,o6/40,h12/FC
where BUFPTR is the same buffer pointer given in the call to MME GEMORE, BLOCK points to the beginning of a qualified filename block created in the 40-word work area, and FC is the file code of the file to be allocated. The values in these two words can be used in a call to MME GEMORE to access the required file with Read permission -- see "expl mme gemore 4" for more details.

Copyright © 2000, Thinkage Ltd.