Figure 8-3. Structure Of A Relative File - HP Guardian User Manual

Hide thumbs Also See for Guardian:
Table of Contents

Advertisement

Using FUP for Advanced File Management
To create a relative file named $USERS.JOHN.RELATIVE whose primary extent size
is 5 pages, whose secondary extent size is 2 pages, and whose record length is 120 bytes,
enter:
-SET TYPE R
-SET EXT (5,2)
.
-SET REC 120
-SHOW
TYPE R
EXT ( 5 PAGES, 2 PAGES )
REC 120
BLOCK
4096
MAXEXTENTS 16
-CREATE RELATIVE
CREATED - $USERS.JOHN.RELATIVE

Figure 8-3. Structure of a Relative File

Relative
File:
Primary access is via
record number.
Example:
FIND 6th
Records are stored according to a record number
supplied by the application program.
Creating a Key-Sequenced File
In a key-sequenced file, records are stored by the values of their primary keys. A
primary key is a field within a record that uniquely identifies the record.
shows a possible format for a record in a key-sequenced file.
--Set the file type to relative.
--You can specify extent sizes in
--pages, bytes, records, and megabytes
--If you do not give a unit, FUP
--assumes pages.
--Set the record length to 120 bytes.
--Show the current parameter values.
--Create the file.
Record
Number
0th
1st
2nd
3rd
4th
5th
6th
7th
nth
Guardian User's Guide —425266-001
Record
Relative
File
.
.
.
.
CDT
003
8 -9
File-Creation Examples
.CDD
Figure 8-4

Advertisement

Table of Contents
loading

Table of Contents