Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sfsadmin_create_relativefile(8) — ACMSxp 3.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ENCINA(8)  —  Maintenance

NAME

sfsadmin create relativefile - creates a new relative file

SYNOPSIS

sfsadmin create relativefile -server servername filename nfields {{fieldname fieldtype [fieldsize]}...} primaryindex rsnfieldname volume [-preallocate npages] [-recordlimit nrecords]

ARGUMENTS

-server servername Specifies the name of the file server. The name must be registered with the DCE Directory Service. If the -server option is not specified, the default is the server defined by the environment variable ENCINA_SFS_SERVER. 

filename Specifies the name of the file to be created. 

nfields {{fieldname fieldtype [fieldsize]...}}
Specifies the record format of the file. Specify the number of fields per record as nfields. For each field, specify the name of the field as fieldname and its type as fieldtype. Possible field types include: unsignedInt16, signedInt16, unsignedInt32, unsignedInt64, signedInt64, decimal, float, double, timestamp, string fieldsize, byteArray fieldsize, varLenByteArray fieldsize, shortVarLenByteArray fieldsize, nlsString fieldsize. Where noted, you must specify fieldsize. When specifying record fields, you must specify fixed-length fields before variable-length fields. When strings of the type nlsString are used as index fields, the collating sequence is determined by the value of the -c option on the sfs command line. If that option is not specified, any field of nlsString type is treated as an invalid type. 

primaryindex Specifies the name of the primary index of the new relative file. 

rsnfieldname Specifies the name of the field containing the relative slot number (RSN) of the record. This field must be of type unsignedInt32. 

volume Specifies the name of the volume on which the newly created file will reside. 

[-preallocate npages] Specifies the number of pages to be reserved for the file. The size of a page is 4096 bytes. If the -preallocate option is not specified, the value of npages is 0. 

[-recordlimit nrecords]
Specifies the limit on the number of records the file can contain. If -recordlimit is not specified, the record limit for relative files is 232-10. 

DESCRIPTION

The sfsadmin create relativefile command creates a relative file.  Relative files are useful for applications that access records directly by slot number. The primary index of a relative file is based on the RSN, the number of the slot occupied by the record. Unlike entry sequence numbers (ESNs), the RSN is part of the record itself (it is the value of the RSN field). 

The records in a relative file are fixed-length slots, with variable-length records. Each record can have fixed- or variable-length fields. When a record in a relative file is updated, the new record can be any length as long as it does not exceed the maximum record size specified when the file was created. 

The disk space allocated to a record in a relative file is freed for use when the record is deleted or when an update makes the record smaller. However, space is not automatically reused. It can be reused when the SFS inserts a new record into the empty slot. 

The names of files, fields, and indices can be any sequence of null-terminated characters and must follow these rules:

File names cannot contain the slash (/) character, and must be less than or equal to 254 characters. 

Field and index names must be less than or equal to 32 characters. 

EXAMPLE

The command in the following example creates a relative file named Inventory with records that contain the fields productName, quantity, price, stockNum, vendorName, and comments. The primary index of this file is stockIndex, and the value of the stockNum field will be used as the RSN.  The file is created on volume sfsVol3. 

% sfsadmin create relativefile Inventory 6 productName string 20 quantity unsignedInt32 price unsignedInt32 stockNum unsignedInt32 vendorName string 16 comments varLenByteArray 50 stockIndex stockNum sfsVol3

PRIVILEGE REQUIRED

Encina SFS create (C) permission on the server

RELATED INFORMATION

sfsadmin create clusteredfile

sfsadmin create sequentialfile

 

  —  March 1997

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026