Supported RPG Features

An externally-described DCL-F DISK file draws its record format and field layout from DDS source supplied via --dds-path. A physical file is described by a .pf member; a logical file is described by a .lf member.

The record format's fields are defined automatically as program globals, so they can be referenced by their DDS field names with no explicit DCL-S or DCL-DS. When the file has a PREFIX, the fields are referenced by their prefixed names instead. An explicit declaration of the same name takes precedence over the implicit one.

PREFIX renames a field but never changes its type: a prefixed packed field is still numeric, a prefixed date field is still a date, and so on. PREFIX(str) prepends str to each field name; PREFIX(str:n) replaces the first n characters instead. A name that merely starts with the prefix but does not match a real field is rejected as an undefined variable - the compiler requires the actual (prefixed) field name. PREFIX is honored on both the free-format DCL-F keyword and the fixed-format F-spec keyword area.

A simple (non-join) logical file inherits its layout from the parent physical file named by the DDS PFILE(parent) keyword: with no field selection it takes all of the parent's fields, and its own key fields define the access path. When the logical file lists specific fields, only those (resolved against the parent) are used. The logical file's record-format name overrides the parent's.

// AROPENL1.lf inherits CUSTNO, BALDUE, ... from AROPEN.pf via PFILE(AROPEN)
DCL-F AROPENL1 DISK KEYED USAGE(*INPUT);

Supply both the .lf and its parent .pf on the --dds-path so the layout resolves.