Page 1 of 1

COBOL-DB2 program compilation

PostPosted: Tue Jun 02, 2015 5:54 pm
by student_123
Hi All,

As per my understanding,

1. during precompilation of a cobol program, the sql statements are seperated to form a "Database Request Module".

2. The DBRM is binded to the database region.

3.Compilation process takes place with DBRM and Load module.

Let me know, if the understanding is correct. Also kindly let know the JCL utilities involved for this process. :)

Re: COBOL-DB2 program compilation

PostPosted: Tue Jun 02, 2015 6:06 pm
by enrico-sorichetti
Let me know, if the understanding is correct.

NOPE ;)

in the preprocessing step the sql statement are converted to some undocumented format and
<written> to the DBRMLIB dataset
the source is converted to a proper COBOL Program
( the EXEC SQL statements are commented and
converted into COBOL calls to the appropriate DB2 interface functions )

in the compilation/linkage editor steps
the DBRMLIB dataset is not used
the program is compiled ( as a normal COBOL program )
and linked to the proper load library

depending on the organisation rules
the bind step might not be done at this point
( the submitter might not have the proper authorisations )

Re: COBOL-DB2 program compilation

PostPosted: Tue Jun 16, 2015 7:00 pm
by pranav283
Also kindly let know the JCL utilities involved for this process


One can use DSNHPC as a pre-compiler that extracts SQL statements from the source code and makes it a modified source (just COBOL statements).