A module which specifies the MAIN or NOMAIN keyword on the Control specification is compiled
without incorporating the program cycle.
When the program cycle is not included in the module,
you are restricted in terms of what can be coded in the main source
section. Specifically, you cannot code specifications for:
- Primary and secondary files
- Heading, detail and total output
- Executable calculations, including the *INZSR Initialization subroutine
- *ENTRY PLIST
Instead you would code in the main source section:
- Full-procedural files
- Input specifications
- Definition specifications
- Declarative calculations such as DEFINE, KFLD, KLIST, PARM, and
PLIST (but not *ENTRY PLIST)
- Exception output
Caution: There is no implicit closing of
global files or unlocking of data areas in a linear module. These
objects will remain open or locked until they are explicitly closed
or unlocked.