The following function is used to record access to an application as part of its startup process:

PROCEDURE LogRec

private user, date, time 

use LOGREC in select( ) 

select LOGREC 

user = user( ) 

date = date( ) 

time = time( ) 

append automem 

use 

The variables that will be used as automem variables are first declared private, to hide any variables of the same name that might exist. Then the table is opened in an unused work area and selected. The automem variables are created manually, using built-in functions. Finally, the values are appended to the table, and the table is closed.