PARSEEXT

Synopsis

HELP:   Parse record-format qualifier from input filename (open-world only; catalog wins on z/OS) [FALSE]
TYPE:   SWITCH
SYNTAX: PARSEEXT

Description

The PARSEEXT switch activates the detection of record-format qualifiers (RECFM and LRECL) from the input filename at read time. When inactive (the default), the filename is treated opaquely and the record format is taken from the explicit RECFORMAT/RECLENGTH parameters or, on z/OS, from the catalog/DCB via fldata().

PARSEEXT is the read-side counterpart of the write-side ADDEXT parameter: ADDEXT appends a qualifier (e.g. ".FB80.") to the output filename at write time, PARSEEXT recognises and applies that qualifier again at read time.

Activation:

- Set PARSEEXT=YES on the individual read command, or - Set the environment variable FL_FIOREC_PARSEEXT=ON globally, which changes the default of PARSEEXT to YES for every read. A read command may still override this with PARSEEXT=NO.

Recognised qualifier tokens:

- Fixed-length formats (F/FB/FBS/FBA/FBM and variants): ".FB<lrecl>.", ".FBA<lrecl>." etc. - Variable-length formats (V/VB/VBS and variants): ".VB.", ".VBS." etc. A trailing decimal number is interpreted as MAXLRECL. - Undefined format (U): ".U." - Delimiter-based formats (DLM): ".DLM<hh>." (hh = hex delimiter byte). - Length-field-mode (LFM) qualifiers: ".LFM16B.", ".LFMS4AD.", ".LFMB16.", ".LFMH.", optionally with trailing "I" for include.

Platform semantics:

- Open-world platforms (Linux, Windows, ...): the qualifier supplies the default RECFM/LRECL when the caller did not specify them. - z/OS MVS host datasets (cataloged names without '/'): the catalog always wins. Filename-qualifier parsing is hard-disabled for these names even when PARSEEXT=YES is active. This prevents a mismatch between filename-derived attributes and real DCB attributes, which has been observed to leave the LE runtime in an inconsistent state (S0C1 operation exception on first fread). - z/OS USS pathnames (contain '/') follow the open-world rules.

PARSEEXT has no effect for filenames starting with ':' (subsystem names like ':DUMMY', ':STREAM'), for DD names ('DD:ddname') or for MVS dataset names accessed via the '//DSN' prefix from USS.