In this section: |
How to: |
Use the LOAD command to load the following types of files into memory for use within a FOCUS session:
Using memory-resident files decreases execution time because the files do not have to be read from the disk. Use the UNLOAD command to remove the files from memory.
The LOAD command loads unparsed Master Files into memory. To store parsed Master Files in memory, use the SET SAVEDMASTERS command described in Saving Master Files in Memory for Reuse.
LOAD filetype filename1... [filename2...]
where:
Specifies the type of file to be loaded (MASTER, FOCEXEC, FOCCOMP, MODIFY, or Access File). For a list of Access File Types, see Considerations for Loading a Master File, FOCUS Procedure, or Access File.
Specifies one or more files to be loaded. Separate the file type and file name(s) with a space.
The following command loads four FOCEXECs—CARTEST, FOCMAP1, FOCMAP2, and FOCMAP3—into memory:
>LOAD FOCEXEC CARTEST FOCMAP1 FOCMAP2 FOCMAP3
A subsequent reference to one of these files during the current FOCUS session will use the loaded, rather than the disk version.
UNLOAD [*|filetype] [*| filename1... [filename2...] ]
where:
Specifies the type of file to be unloaded (MASTER, FOCEXEC, FOCCOMP, MODIFY, or Access File). For a list of Access File Types, see Considerations for Loading a Master File, FOCUS Procedure, or Access File.
To unload all files of all types, use an asterisk.
Specifies one or more files to be unloaded. Separate the file type and file name(s) with a space. To unload all files of that file type, use an asterisk.
The following command unloads two memory-resident FOCEXECs— CARTEST and FOCMAP3:
>UNLOAD FOCEXEC CARTEST FOCMAP3
Any subsequent reference to one of these files will use the disk version.
Reference: |
Loading Master Files, Access Files, and FOCEXECs into memory eliminates the I/Os required to read each time they are referenced. Whenever FOCUS requires a Master File, Access File, or executes a FOCEXEC, it first looks for a memory-resident MASTER, Access File, or FOCEXEC file. If FOCUS cannot find the file in memory, it then searches for a disk version in the normal way.
The following are considerations for loading a Master File, FOCUS procedure, and Access File:
Access File |
File Type |
---|---|
ADABAS |
FOCADBS |
CA-DATACOM |
FOCDTCM |
DB2 |
FOCSQL |
FOCUS |
ACCESS |
CA-IDMS |
FOCIDMS |
IDMS/SQL |
FOCSQL |
IMS/DB |
ACCESS |
Model 204 |
ACCESS |
ORACLE |
FOCSQL |
TERADATA |
FOCDBC |
How to: |
When you load a compiled MODIFY request, FOCUS loads the FOCCOMP file from disk into memory, then reads and parses the Master File and binds the description to the FOCCOMP file. You may then run the request by issuing the RUN command. The RUN command causes FOCUS to search for a memory-resident FOCCOMP file. If FOCUS cannot find the file, it searches for a disk version in the normal way.
Loading FOCCOMP files not only eliminates the I/Os required to read large FOCCOMP files and the associated Master Files, but also causes another, more subtle effect. When issuing the RUN command to execute a FOCCOMP file from disk, virtual storage must be paged in to accommodate it. If the FOCCOMP file is large, it may require many pages (and a large virtual storage area) in a very short time. If you load the FOCCOMP file first, the initial surge of paging occurs only once at LOAD time. After that, each execution of the loaded file requires a lower paging rate.
RUN request
where:
Is the name of the compiled request stored in memory.
The LOAD MODIFY command is similar to the COMPILE command (described in the Maintaining Databases manual) except that instead of writing the compiled output to a FOCCOMP file on disk, FOCUS writes the output into memory as a pre-loaded, compiled MODIFY. FOCUS then reads the Master File associated with the MODIFY command from disk and translates it into an internal table that is tightly bound with the compiled MODIFY. Thus the command
>LOAD MODIFY NEWTAX
has substantially the same effect as
>COMPILE NEWTAX >LOAD FOCCOMP NEWTAX
except that the compiled code is never written to disk.
After you enter a LOAD MODIFY command, the resulting compiled MODIFY is indistinguishable from code loaded with LOAD FOCCOMP. Thus the UNLOAD MODIFY and ? LOAD MODIFY commands produce exactly the same results as the UNLOAD FOCCOMP and ? LOAD FOCCOMP commands. Note that the UNLOAD FOCCOMP and UNLOAD MODIFY commands unload the bound Master File as well.
When you issue the RUN command to invoke a MODIFY procedure, FOCUS looks for a memory-resident compiled procedure (created by a LOAD FOCCOMP or LOAD MODIFY command) of that name. If the procedure cannot be found, FOCUS then searches for a disk version of the FOCCOMP file in the normal way.
The benefits of the LOAD MODIFY command are that disk space is not used to store the FOCCOMP file, disk I/Os are reduced, the FOCEXEC cannot get out of step with the compiled version, and the paging rate is reduced as it is with FOCCOMP files.
How to: |
The ? LOAD command displays the file type, file name, and resident size of currently loaded files.
? LOAD [filetype]
where:
Specifies the type of file (MASTER, Access File, FOCEXEC, FOCCOMP, or MODIFY) on which information will be displayed. For a list of Access File Types, see Considerations for Loading a Master File, FOCUS Procedure, or Access File.
To display information on all memory-resident files, omit the file type.
Issuing the command
? LOAD
produces information similar to the following:
FILES CURRENTLY LOADED CAR MASTER 4200 BYTES EXPERSON MASTER 4200 BYTES CARTEST FOCEXEC 8400 BYTES
|
Information Builders |