XFILE Verb

Syntax

XFILE string1{,string2}{,ERR=lineref}

Description

The XFILE verb defines any disk file type except a disk directory.

Parameter

Description

string1

File identification information, in the format returned by the XFID() Function.

string2

Key definition data for multikeyed MKEYED, XKEYED, or VKEYED files, as derived from the XFIN() Function, XFIN$(86). Information ignored for all files other than MKEYED, XKEYED, and VKEYED files.

ERR=lineref

Branch to be taken if an error occurs during execution.

The XFILE verb is used in an erase-redefine procedure, as shown in the examples below. The examples remove all data from the file. For additional information, see the INITFILE Verb.

See also FILE Verb.

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.

Examples

1000 OPEN (1)"afile"
1010 LET F$=XFID(1)
1020 CLOSE (1)
1030 ERASE "afile"
1040 XFILE F$

For MKEYED/XKEYED/VKEYEDfiles only:

1000 OPEN (1)"afile"
1010 LET F$=XFID(1),G$=XFIN(1)
1020 CLOSE (1)
1030 ERASE "afile"
1040 XFILE F$,G$(86)

See Also

Modifying Programs to Access the Data Server

Data Server Syntax

Verbs - Alphabetical Listing