Create a program that has SQL statements

The first step is to have a program that has SQL statements. To control the building of this program you would normally use a Linkedit Control (LEC) architecture definition. This defines all the source modules in your load module. It will also include the DB2® Language module. For example, a LEC architecture definition for an MVS™ batch program with DB2 might be created as follows:

Figure 1. Sample LEC architecture definition
INCLD SCLMDB2P SOURCE
CMD   INCLUDE SYSLIB(DSNELI)
*
PARM RMODE(24),AMODE(31)
*
LOAD  SCLMDB2P LOAD
LMAP  SCLMDB2P LMAP