Creating the static SQL load module report

The static SQL Load module (BNDA007) produces a report that shows which load module and CSECTs within the load module call static SQL. This report is useful when you attempt to match DBRMs with load modules.

About this task

The static SQL load module reads all members in a load library and examines each CSECT within each load module. If a CSECT uses static SQL, the report shows the load module name and the CSECT name. It also places a YES in the SQL column. If SQL use is not found, a NO is placed in the SQL column.

The sample JCL that is shown in the following figure produces the report that is shown in Figure 2.
Figure 1. Sample JCL for static SQL load module report
  //BNDA007   JOB (ACCT),' ',CLASS=?,MSGCLASS=?
  //*

  //*******************************************************************
  //********************  CHANGE LOG  *********************************
  //*******************************************************************
  //*                                                                 *
  //*   ----  20010416  DNS                                           *
  //*                                                                 *
  //*******************************************************************
  //*
  //RUN    EXEC  PGM=BNDA007
  //STEPLIB   DD DISP=SHR,
  //             DSN=          *** PDS CONTAINING BNDA007 PROGRAM ***
  //LOADLIB   DD DISP=SHR,
  //             DSN=          *** LOADLIB TO BE PROCESSED ***
  //SYSUDUMP  DD SYSOUT=*
  //SYSPRINT  DD SYSOUT=*
 //
Figure 2. Static SQL load modules
                      Load Modules Containing Static SQL              PAGE
                                                                      0001
0Load Library: P390.BND210.LOADLIB

0--LMOD--   CSECT      SQL?

 BNDAVB                No
 BNDA001               No
 BNDA002               No
 BNDA002A              No
 BNDA002B              No
 BNDA003               No
 BNDA005               No
 BNDA006               No
 BNDA007               No
 BNDA009    BNDA009    Yes
 BNDCKSUB              No