DBRMLIB

Category

Compiler output

Pragma equivalent

None.

Purpose

Provides the location for the database request module used in conjunction with the SQL option.

Syntax

Read syntax diagramSkip visual syntax diagramDBRM (// Partitioned data set// Partitioned data set (member)z/OS UNIX System Services filenamez/OS UNIX System Services directory)

Defaults

DBRMLIB(DD:DBRMLIB)

Parameters

Partitioned data set
Specifies the partitioned data set for the database request module. It must be either a relative data set name, or an absolute data set name enclosed in single quotation marks. In either case, it must also be prepended by //.
Partitioned data set (member)
Specifies the partitioned data set (member) for the database request module. It must be prepended by //.
z/OS UNIX System Services filename
Specifies the z/OS® UNIX System Services file name for the database request module.
z/OS UNIX System Services directory
Specifies the z/OS UNIX System Services directory for the database request module.

Usage

When the DBRMLIB option is in effect, the compiler specifies the output for the database request module (DBRM), which is generated by the SQL option. The DBRM output contains the embedded SQL statements and host variable information extracted from the source program, information that identifies the program, and ties the DBRM to the translated source statements. It becomes the input to the DB2® bind process.

Note: The DBRMLIB option can only be specified when the SQL option is also specified.

As of z/OS V1R9, the compiler has been extended to support PDS and z/OS UNIX directory compiles with the SQL option, making it possible to compile all members of a PDS or all files in a z/OS UNIX directory in one single JCL job step.

Predefined macros

None.

Examples

If you do not specify a file name for the DBRMLIB option, the compiler generates a file name as follows:
  • If you are calling the compiler from a JCL, the compiler uses the source file name to form the name of the DBRM data set. The high-level qualifier is replaced with the userid under which the compiler is running, and .DBRM is appended as the low-level qualifier. For example, with the User ID “USER01”:
    • If you compile a source file //'USER01.PDS.C(FOO)', the generated name of the DBRM file would be //'USER01.PDS.C.DBRM(FOO)'.
    • If you compile a source file //'USER01.SEQ.C', the generated name of the DBRM file would be //'USER01.SEQ.C.DBRM'.
      Note: The DB2 SQL coprocessor may not support sequential data sets.
    • If you compile a source file /home/user01/foo.c, the generated DBRM file would be ./foo.dbrm.
  • If you are calling the compiler from z/OS UNIX System Services and using the xlc utility, the compiler stores the DBRM output in a file that is based on the source file name. For example, if compiling with the User ID “USER01”:
    • If you compile a source file //'USER01.PDS.C(FOO)', the generated name of the DBRM file would be //'USER01.PDS.DBRM(FOO)'.
    • If you compile a source file //'USER01.SEQ.C', the generated name of the DBRM file would be //'USER01.SEQ.DBRM'.
    • If you compile a z/OS UNIX file /home/user01/foo.c, the generated DBRM file would be ./foo.dbrm.
  • Like xlc, the c89 utility always generates a default destination name based on the source file name. By default, the behavior is the same as in the xlc case. However, this can be changed by setting _OSUFFIX_HOSTQUAL and _OSUFFIX_HOSTRULE to 0 which yields the same behavior as in the JCL case.

If you do not specify the DBRMLIB compiler option at all (in combination with the SQL compiler option), an empty DBRMLIB compiler option (without a file name specified) will be implicitly assumed by the compiler. If you have explicitly specified a DBRMLIB file using the DBRMLIB DD, the DBRMLIB file name specified in the DD will be used.

The DBRM file is considered as output from the compiler. For further details on valid input and output file combinations, refer to Output from the compiler.

When the DBRMLIB compiler option is specified in JCL, and a DBRMLIB DD statement is also specified, the option will take precedence over the DD statement.

The compiler does not verify the DCB attributes of the data set; you must ensure the data set is created with the correct attributes, as expected by DB2 Universal Database. Refer to Db2 for z/OS in IBM Documentation for details.