Syntax for RMS Master File Attributes

In this section:

This topic details the syntax for the attributes used to describe files, segments, and fields.


Top of page

x
File Attributes

File Declaration:

FILE[NAME]=filename, SUFFIX=type, {DATASET|DATA}='filename',$

Attribute

Function

Value

FILE[NAME]

Identifies the Master File.

All characters and digits, but no embedded blanks. Eight characters maximum.

SUFFIX

Identifies the type of file to which the Master File applies.

RMS.

DATASET|DATA

Identifies the physical location of the data source.

Optional attribute. The RMSFILE attribute in the Access File or a FILEDEF command are alternatives. For more information, see Associating an RMS Data Source to a Master File.

Is the platform-dependent physical name of the data source.

Note: The SUFFIX values listed here pertain to the RMS files. The SUFFIX parameter can have other values for data that resides on other Database Management Systems that can be accessed. Consult the appropriate Adapter manuals for these products.

Except for the following differences, the description of data and relationships between fields within a file is the same for keyed (indexed) and non-keyed RMS files, FIX (fixed-format sequential) files, and COM (comma-delimited) files. Keyed and non-keyed RMS file use RMS File System API calls to access data. The others use sequential file reads for accessing the data source. Index-related declarations do not apply to fixed-sequential or comma-delimited files.



x
Segment Attributes

Segment Declaration:

{SEGNAME|SEGMENT}=segname[,SEGTYPE=S0][,PARENT=parent_name]
             [          {n        }]
             [, OCCURS= {fieldname}]  [, POSITION=fieldname],$
             [          {VARIABLE }]

Attribute

Function

Value

SEGNAME
SEGMENT

Identifies a collection of data fields that are related.

All characters and digits, except special characters. Up to eight characters in length.

SEGTYPE

Identifies the physical storage of the segment.

S0.

PARENT

Identifies the "parent" or owner of the current segment.

Any valid segment name previously defined in the Master File.

OCCURS

Identifies the field as a multiply-occurring field and specifies how the number of occurrences will be determined.

Any integer from 1 to 4095 or any valid field name or VARIABLE.

POSITION

Identifies the field in the parent that marks the beginning of the multiply-occurring fields.

All characters and digits, except special characters.



x
Field Attributes

Field Declarations:

              {fieldname}        {alias             }
FIELD[NAME]=  {FILLER   } ALIAS= {rectype identifier},USAGE=usage,
              {RECTYPE  }        {ORDER             }
              {MAPVALUE }        {KEY(n)            }
                                 {MAPFIELD          }
 
ACTUAL=actual [,FIELDTYPE =I,ACCEPT{list }]
              [,INDEX=I            {range}]
              [,TITLE='text'][,DESCRIPTION]=description],$
 
GROUP= {groupname|keyname} ,ALIAS={DKEY(n)|KEY(n)}
       ,USAGE=usage,ACTUAL=actual [,FIELDTYPE=I],$
 
[DEFINE name/format=expression;$]

Attribute

Function

Value

FIELDNAME

Uniquely identifies a data item in the file.

All characters and digits, with a maximum of 64.

ALIAS

Alternate field name, sometimes used to provide additional information about the field.

All characters and digits, except special characters, with a maximum of 64.

USAGE

Describes the format of the field as interpreted for usage (display) purposes.

See RMS Attribute Summary.

ACCEPT

Assigns a list or range of acceptable values for RECTYPE or MAPVALUE.

See RMS Attribute Summary.

ACTUAL

Describes the format of the field as it exists in the external file.

See RMS Attribute Summary.

FIELDTYPE

Identifies a group field on keyfield.

Can be only one character, which is I.

TITLE

Provides one or more lines of text to be used as an alternate column heading for the field name on reports.

All characters and digits with a maximum of 64.

DESCRIPTION

Documents the meaning of a field in the Master File.

All characters and digits, with a maximum of 44.

GROUP

Identifies a key.

All characters and digits, except special characters, with a maximum of 48.

DEFINE

Creates a temporary field for reporting purposes.

Mathematical or logical statement made up of constants, field names, or other DEFINE fields.


iWay Software