Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sfsadmin_create_clusteredfile(8) — ACMSxp 3.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ENCINA(8)  —  Maintenance

NAME

sfsadmin create clusteredfile - creates a new clustered file

SYNOPSIS

sfsadmin create clusteredfile -server servername filename nfields {{fieldname fieldtype [fieldsize]}...} primaryindex [-unique] nindexfields {{fieldname [-descending]}...} 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 clustered file. 

[-unique] Specifies that key values for this index must be unique. If the -unique option is not specified, duplicate key values are allowed for the index. 

nindexfields {{fieldname [-descending]}...}
Specifies the number of fields in the new index and their names. Specify the number of fields in the index as nindexfields. For each field, specify the name of the field as fieldname. The option -descending specifies that the field will be sorted in descending order. If the -descending option is not specified, fields are sorted in ascending order. 

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 clustered files is 264-10. 

DESCRIPTION

The sfsadmin create clusteredfile command creates a clustered file.  Clustered files are useful for applications that need to access records based on the value of a specific field or fields, and not on physical placement of the records. The primary index of a clustered file is based on any field or combination of fields specified by the user when the file is created. 

The records in clustered files can have fixed- or variable-length fields. When a record in a clustered 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 is freed for use when the record is deleted or when the record update makes the record smaller. The SFS automatically reclaims the freed space. 

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 clustered file named Accounts, with records that contain the fields customerName, accountNum, creditRating, and accountBalance. The file has a primary index (accountIndex) with one key field (accountNum). The file is created on volume sfsVol1. 

% sfsadmin create clusteredfile Accounts 4 customerName string 64 accountNum unsignedInt32 creditRating unsignedInt32 accountBalance signedInt32 accountIndex 1 accountNum sfsVol1

PRIVILEGE REQUIRED

Encina SFS create (C) permission on the server

RELATED INFORMATION

sfsadmin create relativefile

sfsadmin create sequentialfile

 

  —  March 1997

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