Examples

Opening the Memo File

You must open the memo file before doing any other operations with it. There are two ways to open the memo file. The old method was to open it in Basic as follows:

CHANNEL = 100

OPEN #CHANNEL,"CUSMAS.MMO",RANDOM'FORCED,64,FILE100

The variable CHANNEL must be used in all of the INMEMO calls. The record size is always 64. The record number variable (in this case FILE100) is not used by INMEMO, but must be specified to comply with BASIC syntax. We recommend using RANDOM'FORCED regardless of whether you are operating with LOKSER or not.

The alternate method of opening the memo file is with a call to INMEMO. In this variation, CHANNEL is a ddb/buffer area rather than the file channel number. Map it as:

MAP1 CHANNEL,X,800

The other parameters would be set as follows:

opcode should be MMO'OPN.

text should contain the memo file specification.

pos will be set to zero if ok, else it will contain the file error number.

exterr will be set to MME'OK if ok, else it will be set to MME'ERR.

All other parameters are irrelevant.