Loading a File

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.

Syntax: How to Load a File

LOAD filetype filename1... [filename2...]

where:

filetype

Specifies the type of file to be loaded (MASTER, FOCEXEC, or Access File). For a list of Access File Types, see Considerations for Loading a Master File, FOCUS Procedure, or Access File.

filename1...

Specifies one or more files to be loaded. Separate the file type and file name(s) with a space.

Example: Loading Multiple Files

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.

Syntax: How to Unload a File

UNLOAD [*|filetype] [*| filename1... [filename2...] ]

where:

filetype

Specifies the type of file to be unloaded (MASTER, FOCEXEC, 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.

filename1...

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.

Example: Unloading Multiple Files

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.

Loading Master Files, FOCUS Procedures, and Access Files

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.

Reference: Considerations for Loading a Master File, FOCUS Procedure, or Access File

The following are considerations for loading a Master File, FOCUS procedure, and Access File:

  • If you load a Master File, Access File, or a FOCEXEC that has already been loaded into memory, the new copy replaces the old copy.
  • Do not load a Master File, Access File, or a FOCEXEC that you are developing because FOCUS will always use the memory-resident copy of the file (until you reload it), rather than the one you are developing. The copy that you are developing on TED or your system editor is the disk copy, not the memory-resident copy.
  • A loaded Master File, Access File, or FOCEXEC requires a maximum of 80 bytes of memory for each of its records plus a small amount of control information, rounded up to a multiple of 4200 bytes.
  • The following are the file types for the various Access Files:

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

Displaying Information About Loaded Files

How to:

The ? LOAD command displays the file type, file name, and resident size of currently loaded files.

Syntax: How to Display Information About Loaded Files

? LOAD [filetype]

where:

filetype

Specifies the type of file (MASTER, Access File, FOCEXEC, 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.

Example: Displaying Information About Loaded Files

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