VKEYED Verb - Create VKEYED File

Syntax

VKEYED fileid,keysize,records,recsize{,ERR=lineref}
VKEYED fileid,keydef{,keydef...},records,recsize{,ERR=lineref}

Description

In BBj 6.0 and higher, the VKEYED verb creates a multi-keyed file that is similar to MKEYED and XKEYED files. For the file creation syntax, refer to XKEYED Verb - Create XKEYED File. The VKEYED file supports the following additional features:

  • The VKEYED file takes its name from the fact that records are variable-length, making this a good choice for storing binary data like bitmaps. Since records are variable length, the recsize parameter does not define a fixed record size, but it should specify a record size that approximates the expected average record size. The filesystem attempts to optimize the internal file structure based on the defined record size.

  • It includes a place for storing a developer-defined chunk of text. This can be a record template or any other data that might be required. Refer to BBjFileInfo::setText.

  • Key chains can be dynamically added (BBjFileInfo::addKey), changed (BBjFileInfo::changeKey) and dropped (BBjFileInfo::dropKey).

  • Key chains can be named (see BBjFileInfo::setKeyName), and programs can specify either the integer key number or the string key name when reading a file (see READ Verb - BBj).

  • In 12.0 and higher, creates a key segment which is case insensitive when using lookup operations such as READ RECORD specifying a KEY= option. This makes it possible to store records with mixed case values, but have the ability to lookup those records by key, irrespective of case. See XKEYED Verb - Create XKEYED File and Key/Index Case Sensitivity.

MODE Options

Mode

Description

CRYPTPASS=

In PRO/5 5.0 and higher, and 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, and PRO/5 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.

See Also

MKEYED Verb - Create MKEYED File

XKEYED Verb - Create XKEYED File

Key/Index Case Sensitivity

BBjFileSystem::recoverFile

Data Server Syntax

Verbs - Alphabetical Listing



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.