12.6 Record presence, order and includes: REC01–REC10
REC01 requires $PROBLEM after optional $SIZES/comments. REC02 rejects unknown record names; REC03 comments on abbreviations. REC04 prevents duplicate single-use records. REC05 requires $INPUT, $DATA, a model and $THETA; REC06 prevents simultaneous $PRED and PREDPP $SUBROUTINES/$PK/$ERROR models.
REC07 checks usual order, REC08 nonempty required content, REC09 placement of $SIZES, and REC10 existence of $INCLUDE, $MSFI and $ETAS/$PHIS FILE= targets.
Order versus semantics
Some out-of-order records may parse, but conventional order improves portability and review. Do not mechanically reorder unfamiliar multi-problem or site-specific streams without understanding scoping.
Unknown records may be legitimate local extensions; declare them through [nonmem].extra_records only after confirming spelling and environment support. This setting should not be used to excuse a typo.
Includes are part of the model
A control stream with external includes is not self-contained. Archive and hash included files, resolve paths from the correct working context, and review code inside them. Existence alone does not validate their contents.
A novice review method
Print a simple inventory with one row per record and columns for problem number, line number, full record name, required/single-use status, and external path. Read it from top to bottom. This makes duplicate records, records attached to the wrong problem, and unexpected ordering visible without requiring expert memory. For every external path, verify both the path qc-nm resolved and the path the production NONMEM job will resolve. They may differ when jobs stage files into a run directory.
Common mistakes
- Treating
$ESTas unknown rather than an abbreviation/comment finding. - Declaring a misspelled record as a site extension.
- Forgetting external include files in the review bundle.
- Mixing
$PREDwith PREDPP code paths.
Checklist
- Inventory records per problem and verify order.
- Confirm required records and nonempty content.
- Resolve and archive all external files.
- Review inserted
$PROBLEMtext before promotion.
Further reading
See control-stream records, $PROBLEM correction and limitations.