Display Files

From Br Wiki
Jump to: navigation, search

Business Rules! uses display files to store procedures, source programs and the BRConfig.sys file. See also Open Display

Structure

Display files are standard ASCII text files. They can be modified with text editors and some word processors. Display files can be printer files, or streams of characters to be sent to a printer. Display files have variable-length records with an optional programmer-specified record delimiter (see OPEN display's EOL parameter for more information about this feature). The default record length for a display file is 132 characters (this is also true for most wide-carriage printers).

The record length in a display file has no impact on input processing. It is possible to input strings which are longer than the record length (provided the input variables are dimensioned large enough). On output, a string that is longer than the record length will be broken into records of 132 characters (or the specified record length).

Viewing the contents

The contents of a display file can be examined or displayed with Business Rules TYPE command.

Use with SORT and INDEX

Display files cannot be used as indexed files and cannot be sorted by Business Rules! built-in file sort. They can be sorted on by the AIDX and DIDX functions as used in the MAT statement (see MAT M in the statements and AIDX or DIDX for more information).

File I/O

Display files may be opened for either INPUT or OUTPUT. As OUTIN is not supported (except with communications files), display files can be difficult to update. Only the sequential access method is allowed on display files. The statements that can be used for input from display files are INPUT and LINPUT. Formatted input is not allowed. Output (either formatted or unformatted) to display files is accomplished with the PRINT statement.