Managing file groups

From m204wiki
Revision as of 23:26, 25 April 2013 by Rob (talk | contribs)
Jump to navigation Jump to search

Overview

Permanent, Temporary and Ad-hoc Groups

CREATE GROUP command

File groups are created using the CREATE GROUP command. The types of groups are:

Type of group Created...
Permanent

By the system manager using the CREATE command.

User access is determined by the privileges defined for the file group.

Use the following syntax to create a permanent group:

CREATE PERM GROUP groupname FROM {filename [AT location] [(OPTIONAL) | (MANDATORY)]} ,... [PARAMETER parameter[=value] [PARAMETER parameter[=value]]... . . . END

For information about creating permanent groups, see the Rocket Model 204 Parameter and Command Reference.

Temporary

By an individual user with the CREATE command and can be referenced only by that user.

Temporary group names exist only during the current login session and are deleted automatically when you log out, unless you delete them during the session.

Use the following syntax to create a temporary group:

CREATE [TEMP] GROUP groupname FROM filename [,filename ...][PARAMETER parameter_list] . . . END

The parameters available for temporary file groups are discussed in the Rocket Model 204 Parameter and Command Reference.

Ad hoc

Within a User Language request by prefacing a statement with the clause:

IN file1, file2 [,file3 ...]

Ad hoc groups have no name and exist only for the current request. They allow record retrieval from many files at once without defining a group in advance. As in any IN clause, all of the files in an ad hoc group must be opened before the group is mentioned. For more information, see the description of Ad hoc groups in the Rocket Model 204 User Language Manual.


Permanent Groups

Temporary Groups

Ad-hoc Groups

Using Groups

Files with large numbers of record

Postponing reorganizations with Groups

Note: the following technique cannot be used if there are references in your code to Internal Record Numbers (IRNs)

File X is almost full Define File Y, which looks like File X (same field names) File Y can be defined to have whatever table sizes it needs Group File X and Y together, with File Y as UPDTFILE Run your application against grouped files X and Y Example: CREATE PERM GROUP X FROM X, Y� PARAMETER UPDTFILE = Y� END