Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
I have heard that some shops, (not the one that I work at) make no effort to retain the DBRM after the package has been bound.
Technically, once the package is bound the DBRM is no longer needed. If you need to Bind the package into another collection within the same DB2 subsystem, you can do a BIND copy.
Despite that, IMO the DBRM should be treated like gold, and should be managed in parallel with the underlying source code. That is the practice in the shop where I work, and I have never felt the need to recover the DBRM text from the catalog, even with older versions of DB2 where it was relatively easy to do.
Database request modules
The database request module (DBRM) is a data set that contains the SQL statements and host variable information that is extracted from the source program, along with information that identifies the program and ties the DBRM to the translated source statements. It becomes the input to the bind process.
The data set requires space to hold all the SQL statements plus space for each host variable name and some header information. The header information alone requires approximately two records for each DBRM, 20 bytes for each SQL record, and 6 bytes for each host variable.
For an exact format of the DBRM, see the DBRM mapping macros, DSNXDBRM and DSNXNBRM, in library prefix.SDSNMACS. The DCB attributes of the data set are RECFM FB, LRECL 80. The precompiler sets the characteristics. You can use IEBCOPY, IEHPROGM, TSOCOPY and DELETE commands, or other PDS management tools for maintaining these data sets.
Restriction: Do not modify the contents of the DBRM. If you do, unpredictable results can occur. DB2 does not support modified DBRMs.
In a DBRM, the SQL statements and the list of host variable names use the UTF-8 character encoding scheme.
All other character fields in a DBRM use EBCDIC. The current release marker (DBRMMRIC) in the header of a DBRM is marked according to the release of the precompiler, regardless of the value of NEWFUN.