Data sets that the precompiler uses

When you invoke the precompiler you need to provide data sets that contain input for the precompiler, such as the host programming statements and SQL statements. You also need to provide data sets where the precompiler can store its output, such as the modified source code and diagnostics messages.

Table 1. DD statements and data sets that the Db2 precompiler uses
DD statement Data set description Required?
DBRMLIB Output data set, which contains the SQL statements and host variable information that the Db2 precompiler extracted from the source program. It is called Database Request Module (DBRM). This data set becomes the input to the Db2 bind process. The DCB attributes of the data set are RECFM FB, LRECL 80. DBRMLIB has to be a PDS and a member name must be specified. You can use IEBCOPY, IEHPROGM, TSO commands, COPY and DELETE, or PDS management tools for maintaining the data set. Yes
STEPLIB Step library for the job step. In this DD statement, you can specify the name of the library for the precompiler load module, DSNHPC, and the name of the library for your Db2 application programming defaults member, DSNHDECP.
Recommendation: Always use the STEPLIB DD statement to specify the library where your Db2 DSNHDECP module resides to ensure that the proper application defaults are used by the Db2 precompiler. The library that contains your Db2 DSNHDECP module needs to be allocated ahead of the prefix.SDSNLOAD library.
No, but recommended
SYSCIN Output data set, which contains the modified source that the Db2 precompiler writes out. This data set becomes the input data set to the compiler or assembler. This data set must have attributes RECFM F or FB, and LRECL 80. SYSCIN can be a PDS or a sequential data set. If a PDS is used, the member name must be specified. Yes
SYSIN Input data set, which contains statements in the host programming language and embedded SQL statements. This data set must have the attributes RECFM F or FB, LRECL 80. SYSIN can be a PDS or a sequential data set. If a PDS is used, the member name must be specified. Yes
SYSLIB INCLUDE library, which contains additional SQL and host language statements. The Db2 precompiler includes the member or members that are referenced by SQL INCLUDE statements in the SYSIN input from this DD statement. Multiple data sets can be specified, but they must be partitioned data sets with attributes RECFM F or FB, LRECL 80. SQL INCLUDE statements cannot be nested. No
SYSPRINT Output data set, which contains the output listing from the Db2 precompiler. This data set must have an LRECL of 133 and a RECFM of FBA. SYSPRINT must be a sequential data set Yes
SYSTERM Terminal output file, which contains diagnostic messages from the Db2 precompiler. The DCB attributes of the data set are determined by the z/OS system. SYSTERM must be a sequential data set. No
SYSUT1 and SYSUT2 Internal work files that the precompiler uses to store temporary information as it converts embedded SQL statements to host language statements. Precompilation of assembler and PL/I source code uses only the SYSUT1 data set. The default SPACE parameter values in the Db2-supplied program preparation procedures (DSNHASM, DSNHC, DSNHCPP, DSNHCPP2, DSNHICOB, DSNHPLI, and DSNHFOR) are adequate in most cases. If your application program contains a large number of embedded SQL statements, you might need to increase those values. No, unless you need to override the default SPACE parameter values.