COBOL-DB2 program compilation



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

COBOL-DB2 program compilation

Postby student_123 » Tue Jun 02, 2015 5:54 pm

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. :)
student_123
 
Posts: 1
Joined: Tue Jun 02, 2015 5:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL-DB2 program compilation

Postby enrico-sorichetti » Tue Jun 02, 2015 6:06 pm

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 )
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: COBOL-DB2 program compilation

Postby pranav283 » Tue Jun 16, 2015 7:00 pm

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).
pranav283
 
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Has thanked: 2 times
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post