View previous topic :: View next topic
|
Author |
Message |
Arun Kumar Tupili
New User
Joined: 30 Nov 2006 Posts: 14 Location: Banglore
|
|
|
|
Hi,
Can any one please let me know the uses of DSNADDR, DSNADD2 and DSNHLI. In complist , I have seen the appropriate call statements for the replacement of SQL Statements.
Why are we calling those routines and what purpose do they serve. Are those any calls to the stored procedures, or DBRM's( App. Pgm. once precomplied, replaces SQL Queries with calls, stores SQL Queries into DBRMLIB).
Also can anyone suggest me in finding an oustanding book on COBOL+DB2
Thanks
Arun |
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 Location: Ottawa Canada
|
|
|
|
DSNADDR is called in the INIT-SQL section (or perhaps it is called SQL-INIT - this is off the top of my head). Its purpose is to establish addressability to each of the host variables that your program uses. DSNHLI (High Level Interface) is called to execute an SQL statement.
I'm not certain about DSNADD2 but I would guess that it performs a similar function as DSNADDR.
Remember that SQL syntax such as EXEC SQL SELECT .... is not understood by the cobol compiler. The DB2 pre-processor converts DB2 syntax into COBOL statements such as CALL. What routines get CALLed? Routines like DSNADDR and DSNHLI. |
|
Back to top |
|
|
Arun Kumar Tupili
New User
Joined: 30 Nov 2006 Posts: 14 Location: Banglore
|
|
|
|
Thanks a lot for the suggestion.
But I am not sure with the exact functionalities of those Routines.
In which DB2 Libraries those reside,etc. |
|
Back to top |
|
|
|