Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS Record Management Utilities Reference Manual


Previous Contents Index

This attribute corresponds to the DAT_NCMPR option in the XAB$B_FLG field and should be set for DECnet for OpenVMS operations.

DUPLICATES

This switch controls whether duplicate keys are allowed in the indexed files. For primary keys, the default setting is NO, but for alternate keys, the default setting is YES.

Duplicate alternate keys can be useful. For example, sorting a customer file on an alternate key of a postal code is a common application and one that requires duplicate keys.

When duplicate keys are not allowed, any attempt to write a record where the key would be a duplicate results in an error.

This attribute corresponds to the DUP option in the XAB$B_FLG field.

INDEX_AREA

This numeric attribute identifies the area where you place the index levels (other than level 1) in an indexed file with multiple areas. The value is an integer in the range 0 to 254, which must be the same number as that assigned to the area in an AREA section.

The INDEX_AREA, DATA_AREA, and LEVEL1_INDEX_AREA values are used when the data level and the index levels are placed in separate areas or when each key is placed in its own area.

This attribute corresponds to the XAB$B_IAN field.

INDEX_COMPRESSION

This switch controls whether leading repeating characters in the index are compressed. The default value is YES; however, for compression to occur, your indexed file must be defined as a Prolog 3 file.

This attribute corresponds to the IDX_NCMPR option in the XAB$B_FLG field and should be set for DECnet for OpenVMS operations.

INDEX_FILL

This attribute sets the percentage of bytes in each index level bucket to be populated initially. If you anticipate that many records will be inserted randomly into the file, this value should be less than 100 percent. The default value is 100 percent and the minimum value is 50 percent.

The /FILL_BUCKETS qualifier to the CONVERT command overrides this attribute.

This attribute corresponds to the XAB$W_IFL field except that the XAB$W_IFL field contains a byte count, not a percentage.

LENGTH

This numeric attribute sets the length of the key in bytes. This value, along with the POSITION and TYPE attributes, is used when the key is unsegmented.

This attribute corresponds to the XAB$B_SIZ0 field. Its value must be specified because there is no default.

LEVEL1_INDEX_AREA

This attribute identifies the area where you place the level 1 index in an indexed file with multiple areas. The value is an integer in the range 0 to 254, which must be the same number as that assigned to the area in an AREA section.

When the data level and the index levels are placed in separate areas, or when each key is placed in its own area, use the LEVEL1_INDEX_AREA, DATA_AREA, and INDEX_AREA values.

This attribute corresponds to the XAB$B_LAN field.

NAME

This string attribute can be used to assign a name to a key. The name string is limited to 32 bytes and is padded with ASCII null characters. The default value is no name (blank).

This attribute corresponds to the XAB$L_KNM field.

NULL_KEY

This switch controls whether null key values will be allowed in an alternate string key field. The default value, NO, requires that all records contain a valid value for this alternate key.

In some databases, such entries are not desirable; some records will not contain a value for a particular alternate key. By allowing null keys, by declaring a null field, and by writing the null field as the alternate key for a record, you can include the record in the database.

A null key value is specified with the KEY NULL_VALUE secondary attribute. If a record has the specified null value in its alternate key field, a pathway to that record will not be made in the alternate index structure.

This attribute corresponds to the NUL option in the XAB$B_FLG field.

NULL_VALUE

This attribute specifies the null value that instructs the system not to create an alternate index entry for the record that has the null value in every byte of the key field. All data types may be used to specify null key values.

If the alternate key is a string data-type key, you can specify the null value either by enclosing the character in apostrophes or by specifying an unsigned decimal number denoting the character's ASCII value without enclosing characters.

Note

The string data-type keys include STRING, DSTRING, COLLATED, and DCOLLATED.
The default is the ASCII null character (0).

This attribute corresponds to the XAB$B_NUL field.

POSITION

This numeric attribute defines the byte position of the beginning of the key field, with the first position being 0. Primary keys work best if they start at byte 0. This attribute, along with the LENGTH and TYPE attributes, is used when the key is unsegmented.

This attribute corresponds to the XAB$W_POS0 field.

PROLOG

This numeric attribute defines the internal structure level of indexed files---PROLOG 1, PROLOG 2, and PROLOG 3.

Prolog 3 files accept multiple keys (or alternate keys) and all data types. They also give you the option of compressing your data, indexes, and keys. PROLOG 3 is the default.

On the other hand, Prolog 1 and 2 files do not allow these options. You should not specify Prolog 3 if the primary key is segmented and the segments overlap. If you want to use a Prolog 3 file in this case, consider defining the overlapping segmented key as an alternate key and then choosing a different key to be the primary key.

To specify a Prolog 3 file, assign the value 3 to this attribute. To specify a Prolog 1 or 2 file, assign the value 2. There is no perceivable difference between PROLOG 1 and PROLOG 2.

If you do not specify a value for this attribute, the utility that creates a data file from the FDL file uses the system or process default. To see these default values, enter the DCL command SHOW RMS_DEFAULT.

This attribute is not supported for DECnet for OpenVMS operations; the default prolog in effect at the remote node is used.

This attribute corresponds to the XAB$B_PROLOG field.

SEGn_LENGTH

This numeric attribute defines the length of the key segment in bytes and is used with the SEGn_POSITION attribute when the key is segmented. The value n is the number of the segment and may be 0 to 7. The first segment in the key must be numbered 0, and each key may have up to eight segments. Segmented keys must be STRING type.

For Prolog 3 files, segments cannot overlap.

This attribute corresponds to the key size fields, XAB$B_SIZ0 to XAB$B_SIZ7.

SEGn_POSITION

This numeric attribute defines the starting byte for a segment in a string key. The first position is 0 and segments cannot overlap in Prolog 3 files.

This attribute corresponds to the positioning fields, XAB$W_POS0 to XAB$W_POS7.

TYPE

This attribute specifies the key type and must have one of the following values:
BIN2 An unsigned, 2-byte, binary number in the range 0 to 65,535 (2 16--1).
BIN4 An unsigned, 4-byte, binary number in the range 0 to 4,294,967,295 (2 32--1).
BIN8 An unsigned, 8-byte, binary value that ranges from 0 to 2 64--1.
COLLATED A string of ASCII characters. If the key is to be sorted by an NCS collating sequence, then the key type must be declared as COLLATED or as DCOLLATED (descending collated---sort in reverse order according to the collating sequence for that particular key). The sort order is determined by the collating sequence for that particular key.
DBIN2 An unsigned, 2-byte, binary value that ranges from 0 to 65,535 (2 16--1). In an indexed file, records are stored in descending order for this key of reference.
DBIN4 An unsigned, 4-byte, binary value that ranges from 0 to 4,294,967,295 (2 32--1). In an indexed file, records are stored in descending order for this key of reference.
DBIN8 An unsigned, 8-byte, binary value that ranges from 0 to 2 64--1. In an indexed file, records are stored in descending order for this key of reference.
DCOLLATED A string of ASCII characters. If the key is to be sorted by an NCS collating sequence, then the key type must be declared as COLLATED or as DCOLLATED (descending collated---sort in reverse order according to the collating sequence for that particular key).
DDECIMAL A packed-decimal value (that is, a continuous string of 1 to 16 bytes) accessed in descending sort order in an indexed file. The format of the DDECIMAL type is the same as for DECIMAL, described next (except that DECIMAL is accessed in ascending order).
DECIMAL A packed-decimal value, which is a continuous string of 1 to 16 bytes. A DECIMAL value is specified by the address of the first byte of the string and by the number of decimal digits.

Each byte in a DECIMAL value is divided into two 4-bit fields. Each of these fields contains the binary representation of one decimal digit, except for the first 4-bit field in the highest byte, which represents the sign of the DECIMAL value.

Although 4 bits can represent values up to decimal 16 (a hexadecimal 10), values greater than 9 are not allowed in a DECIMAL 4-bit field, except for the sign field.

The first byte contains the two beginning digits of the value. The high-order nibble contains either the most significant digit or a leading zero if it is needed to make the sign field appear in the correct 4-bit field.

For example, a DECIMAL value of +123 has a length of 3 (for 3 digits) and requires 2 bytes of storage.

A DECIMAL value of --5237 would have a length of 4 digits. It would need 3 bytes of storage.

DINT2 A signed, 2-byte integer accessed in descending order in an indexed file. This data type can represent integers between --32,768 and +32,767.
DINT4 A signed, 4-byte integer accessed in descending order in an indexed file. This data type can represent integers between --2,147,483,648 and +2,147,483,647.
DINT8 A signed, 8-byte integer accessed in descending order in an indexed file. This data type can represent integers between --2 63 and +2 63--1.
DSTRING A string of ASCII characters accessed in descending sort order in an indexed file. The maximum length of the string is 255 characters.
INT2 A signed, 2-byte integer; this data type can represent integers between --32,768 and +32,767.
INT4 A signed, 4-byte integer; this data type can represent integers between --2,147,483,648 and +2,147,483,647.
INT8 A signed, 8-byte integer; this data type can represent integers between --2 63 and +2 63--1.
STRING A string of ASCII characters. The longest length allowed is 255 characters.

The default key data type is STRING.

This attribute corresponds to the XAB$B_DTP field.

4.1.9 NETWORK Section

The NETWORK section sets run-time network access parameters. The following table lists the NETWORK secondary attributes and their default values. Note that all NETWORK secondary attributes are run-time attributes.
Secondary Attribute Default Value
BLOCK_COUNT Varies
LINK_CACHE_ENABLE YES
LINK_TIMEOUT 30
NETWORK_DATA_CHECKING YES

BLOCK_COUNT

A local node uses this numeric attribute to establish the size, in blocks, of a message buffer for messages between itself and a remote node. The value can be 0 to 127. By default, the local node uses the NETWORK BLOCK COUNT value for the process. If that value is 0, then the NETWORK BLOCK COUNT value for the system is used. Use the SHOW RMS command to see what the process and system values are for NETWORK BLOCK COUNT.

The BLOCK_COUNT attribute corresponds to the XABITM item code XAB$_NET_BLOCK_COUNT, the requested block count.

LINK_CACHE_ENABLE

This switch enables logical link caching. It corresponds to the XABITM item code XAB$_NET_LINK_CACHE_ENABLE.

LINK_TIMEOUT

This numeric attribute specifies the logical link timeout in seconds, from 0 to 65,535. It corresponds to the XABITM item code XAB$_NET_LINK_TIMEOUT.

NETWORK_DATA_CHECKING

This switch enables data access protocol (DAP) level cyclic redundancy check (CRC). It corresponds to the XABITM item code XAB$_NET_DATA_CRC_ENABLE.

4.1.10 RECORD Section

The RECORD section contains secondary attributes that define various controls for records. The RECORD keyword itself takes no value; it serves only to begin this section. The following table lists the RECORD secondary attributes and their default values. Note that all RECORD secondary attributes are create-time attributes.
Secondary Attribute Default Value
BLOCK_SPAN YES
CARRIAGE_CONTROL CARRIAGE_RETURN
CONTROL_FIELD 2
FORMAT VARIABLE
SIZE No default

BLOCK_SPAN

This switch determines whether records can span block boundaries in a sequential file. It corresponds to the BLK option in the FAB$B_RAT field.

When the switch is set to NO, records cannot be larger than 512 bytes. When the space remaining in a block is insufficient to store the next record, RMS stores the next record in a new block.

CARRIAGE_CONTROL

This attribute corresponds to the FAB$B_RAT parameter and must be one of the following keywords:
CARRIAGE_RETURN Specifies that each record is preceded by a line feed and is followed by a carriage return when the record is written to a carriage control device, such as a line printer or a terminal. This is the default.
FORTRAN Specifies that the first byte (byte 0) of each record contains a FORTRAN (ASA) carriage control character. The following lists the byte 0 values, the ASCII representation of each byte and the carriage control interpretation.
Byte 0
Value
ASCII Meaning
0 Null Null carriage control. Sequence: print buffer contents.
||
20 Space Single-space carriage control. Sequence: line feed, print buffer contents, carriage return.
24 $ Prompt carriage control. Sequence: line feed, print buffer contents.
||
28 + Overprint carriage control. Sequence: print buffer contents, carriage return. Allows double printing for emphasis.
||
30 0 Double-space carriage control. Sequence: line feed, line feed, print buffer contents, carriage return.
31 1 Page eject carriage control. Sequence: form feed, print buffer contents, carriage return.
||
All
others
  Same as ASCII space character: single-space carriage control.
NONE Specifies that no carriage control is to be provided.
PRINT Specifies that the fixed control portion of VFC records contains carriage control information. The first byte of the control portion specifies the carriage control to be performed before printing. The second byte specifies the control to be performed after printing.

The following table shows the encoding scheme for the control bytes when you specify the PRINT keyword.
B7 B6 B5 B4 Meaning
0 0 0 0 To specify no carriage control (NULL), set bits 3 to 0 at 0.
0 x x x Use bits 6 to 0 to specify a count of new lines (line feed followed by carriage return).
1 0 0 x Output the ASCII C0 control character specified by the configuration of bits 4 to 0.
1 0 1 x Reserved.
1 1 0 0 Skip to the vertical format unit (VFU) channel (1-16) specified by bits 3 to 0. Devices that do not have hardware VFUs translate these codes as a 1-line advance.
1 1 0 1 Reserved.
1 1 1 0 Reserved.

CONTROL_FIELD

This attribute specifies the size, in bytes, of the fixed-length control portion of VFC records. Its value must be a number in the range 1 to 255. The default value is 2.

This attribute corresponds to the FAB$B_FSZ field.

FORMAT

This keyword attribute establishes the record format for the data file. Its value must be one of the following keywords:
FIXED Specifies fixed-length records.
STREAM Specifies that the records are STREAM records; the record is viewed as a continuous stream of bytes, delimited by a special character. This format is compatible with RMS--11 stream files. This is valid for sequential files only.
STREAM_CR Specifies that the records are STREAM records; the record is viewed as a continuous stream of bytes, delimited by a CR character. This is valid for sequential files only.
STREAM_LF Specifies that the records are STREAM records; the record is viewed as a continuous stream of bytes, delimited by an LF character. This is valid for sequential files only.
UNDEFINED Specifies undefined record format, which means that the record is a continuous stream of bytes with no specific terminator. This keyword is valid for sequential files only.
VARIABLE Specifies variable-length records. This is the default setting.
VFC Specifies variable-length records with fixed-length control fields (VFC). This is valid for sequential and relative files.

This attribute corresponds to the FAB$B_RFM field.

SIZE

Sets the maximum record size in bytes.

When used with fixed-length records, this value is the length of every record in the file.

When used with variable-length records, this value is the longest record that can be placed in the file. With sequential or indexed files, you can specify 0 and the system will not impose a maximum record length. (Note, however, that records in an indexed or relative file cannot cross bucket boundaries.)

When used with relative files, the SIZE attribute is used with the BUCKET_SIZE attribute to set the size of the fixed-length cells.

With VFC records, do not include the fixed control portion of the record in the SIZE calculation; only the data portion is set by this attribute. The RECORD CONTROL_FIELD attribute sets the size of the fixed control portion.

The fixed area is the size, in bytes, of the fixed-control portion of VFC records. Regular VFC records have a control field size of 0.

This attribute corresponds to the FAB$W_MRS field.

Table 4-1 gives the maximum record sizes, in bytes, for the various file organizations and record formats.

Table 4-1 Maximum Record Size for File Organizations and Record Formats
File Organization Record Format Maximum Record Size
Sequential Fixed-length 32,767
Sequential (disk) Variable-length 32,767
Sequential (disk) VFC 32,767 1
Sequential (disk) Stream 32,767
Sequential (disk) Stream CR 32,767
Sequential (disk) Stream LF 32,767
Sequential (ANSI Tape) Variable-length 9,995
Sequential (ANSI Tape) VFC 9,995 1
Relative Fixed-length 32,255
Relative Variable-length 32,253
Relative VFC 32,253-FSZ 1
Indexed, Prolog 1 or 2 Fixed-length 32,234
Indexed, Prolog 1 or 2 Variable-length 32,232
Indexed, Prolog 3 Fixed-length 32,224
Indexed, Prolog 3 Variable-length 32,224


1The maximum record size listed for the VFC record format is for the data portion of the record only. It does not include the number of bytes in the control area.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6027PRO_008.HTML