Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

DB2-L - Impliziter Verbindungsaufbau bei CAF (oder RRSAF) bei erstem SQL

Subject:

Re: DB2 exit routine

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

DB2 List <db2-l@lists.idug.org>

Date:

2011.01.06 16:55:00


We do this all the time - checking on first call to "our own" DSNHLI, if there
is already a connection to DB2 and, if not, what kind of connection is required
(TSO, IMS, Batch/CAF, Batch/RRSAF - no CICS here), then establish the correct
connection based on specified or looked-up subsystem and plan informations, then
calling the appropriate IBM language interface.

"Our" DSNHLI replacement is only a little stub which calls the logic that I
described above dynamically (MVS LOAD, entry point statically stored, module
loaded only once).

I'm not allowed to share the code, because it belongs to my customer, but I'm
certainly allowed to tell you about some technical details and answer questions
about it.

Kind regards

Bernd



Am 06.01.2011 15:54, schrieb P.G.:
> Exit routine? No
>
> BUT it is possible to write code that replaces DSNHLI and thus gets called
> INSTEAD of the real DSNHLI
>
> I did this some time ago to provide such things as host variable tracing for
> COBOL programs
>
> It gets a bit messy, and all I had to worry about was 16/31 bit addressing
> conflicts - now there's 64 bit as well
>
> The theory should still work though
>
> In "your" DSNHLI, you are responsible for doing a CAF connect to DB2 with a
> plan name of your choice and then, every time you are called, passing the SQL to
> DSNALI for DB2 to execute
>
> Just been looking at my code - it was written in 1992(!), so I am not sure I
> want to share it as I'm pretty sure it won't work without significant
> modification
>
> P.G.


F.S.
DB2 exit routine
January 6, 2011 12:21 AM

Is there a DB2 for z/OS exit routine that is invoked on, at least, the first
EXEC SQL statement? Specifically, I'm interested in writing an exit that would
allow me to specify the plan 'dynamically' when the first SQL statement is
executed.

This is for BATCH (CAF), not CICS.

I know I can explicitly call a routine that calls the DSNALI OPEN function, but
I'd like to avoid having the program do this explicitly, if possible. If there
was such an exit routine invoked I would add the call to DSNALI OPEN inside of
it.

Thanks,
F.

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie