INDEXED Verb - Create INDEXED File

Syntax

INDEXED fileid,records,recsize{,MODE=str}{,ERR=lineref}

Description

The INDEXED verb creates an indexed file to the given specifications.

Parameter

Description

fileid

Name of the new file; must be unique.

records

Number of records to be allocated; must be an integer. For a dynamically allocated file, specify 0.

recsize

Size of each record in bytes and must be an integer in the range of 1 to 32767. The total size of the file cannot exceed (2^31)-1 bytes. The number of bytes required for an indexed file may vary from system to system. Multiplying records by recsize provides an accurate estimate of the number of bytes needed for an indexed file.

ERR=lineref

Branch to be taken if an error occurs during execution.

PRO/5 takes the optional ERR= branch, if a problem occurs while creating the file.

In an indexed file, records can be accessed either sequentially or randomly by record number.

MODE Options (BBj Only)

Mode

Description

CRYPTPASS=

In BBj 4.0 and higher, creates an encrypted file with the specified password. BASIS recommends a password of at least 20 characters when using AES-128 and at least 40 characters when using AES-256.

Note: Encrypted files tend to perform slower than non-encrypted files due to the overhead of encrypting and decrypting each time the file is accessed.

Mode

Value

Description

CRYPTALG=

AES-128

AES-256

Uses AES-128 bit encryption, which is also the default.

In BBj 6.0 and higher, uses AES-256 bit encryption.

To utilize AES-256 in BBj, the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files must be installed. These files are available for download at Oracle's Java SE Downloads page under "Additional Resources" near the bottom of the page.

Note:

PRO/5 supports the creation of encrypted MKEYED files, but does not support encryption of other file types.

Example

1000 INDEXED "TEST2",300,190,ERR=9400

See Also

Data Server Syntax

Verbs - Alphabetical Listing

INDEXED Files