Building a Shell
This section provides instructions on building a shell separately from compiling using the Build Shell utility (bldsh). The Lawson compile tools, described in Compiling from Program Definition build a shell from the generated code.
Because the individual program segments cannot be compiled separately, the Lawson precompiler creates a program shell (.cbl) before it compiles a program. The program shell contains all the individual segments required to compile a program. The precompiler creates the program shell each time it compiles a program to ensure that any changes made in any program segment are reflected in the shell.
Although the precompiler creates the shell before it compiles the program, you can build a shell without compiling the program.
To create the program shell (.cbl), the precompiler analyzes the procedural code (PD) to determine which library modules and database routines it references. It includes these routines and any referenced program files in the shell. All program shells contain:
-
Required DIVISION and SECTION statements,
-
Working storage for the transaction code, database, and form routines,
-
Database routines,
-
Form routines, and
-
Files specific to the program.
The precompiler copies some routines into the program shell and generates code for other routines.
To build a shell