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[()...])
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.
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.
STRING: NAME/FILE['str'/STREAM/DUMMY...] - Name/URL of file to read [STDIN]
STREAM - Read from stdin or write to stdoutDUMMY - Read EOF or write nothingSTRING: EXCLUDE['str'...] - Exclude files matching the specified wildcard pattern from processing; multi-value [none]NUMBER: RECMOD=STOP/CUT/WRAP/SKIP - Mode used to read records [STOP]
STOP - Stop if record too longCUT - Cut if record too longWRAP - Wrap if record too longSKIP - Skip if record too longNUMBER: RECLEN=num - Record (Host) length / Line (Unix/Win) length for read operations [512]NUMBER: RECCNT=num - Amount of records handled in one read operation [128]NUMBER: PRNOUT=num - Amount of lines per page if print control replacement active [0 = inactive]SWITCH: SUPCTR - Suppress control characters [FALSE]