TXT

Synopsis

HELP:   Read a file text-oriented (mainly for open world)
TYPE:   OBJECT
SYNTAX: TXT(NET.{},NAME/FILE['str'/STREAM/DUMMY...],EXCLUDE['str'...],RECMOD=STOP/CUT/WRAP/SKIP,RECLEN=num,RECCNT=num,PRNOUT=num,SUPCTR,SUBSYS(),REMOVE,RENAME='str',PREPRO[()...],POSTPRO/PSTPRO[()...])

Description

This object defines the text-oriented read operation for files. This method reads text records from a file with text delimiters. The data must be a text file in a certain character set where each record is terminated with the system specific delimiter. You can define the maximum record length and what to do, if a record is longer than the provided record length.

On read, you can also activate the conversion of the data into a printout-like amount of records, i.e. print control characters are replaced by records so that it looks like the data was printed.

The access method removes zero padding and trailing whitespaces from each record by default. Additional You can activate the suppression of control and space character (except tabulators or blank) in the data.

Limits on the record length

RECLENGTH sizes the part of the buffer that keeps one whole record or line in front of the data, and together with RECCOUNT it sizes the data part. A length above 1 GiB, or a product of the two above 1 GiB, is refused with a message naming the values instead of wrapping the size. The limit is the buffer arithmetic, not the record length: a text line may well be larger than the maximum record FLAM handles, and such a length stays valid.

Arguments