Commit upon exiting subprogram

Mike Baker

Commit upon exiting subprogram
Hi,

We have Easytrieve Plus, but we do not possess the "Easytrieve Plus /
DB2"; we only have the plain (vanilla) version and also the DLI version.

We would like to be able to access DB2 from plain (vanilla) Easytrieve. (PS:
or via the DLI version, if this might be better.)

One way of doing this would be for the Easytrieve program to call an
Assembler/COBOL subprogram, which would handle all of the SQL.

However, its my understanding that upon exiting the subprogram, that all of
the DB2 work will be committed. And... this could be a potential problem.

Is there some way around this?? Please advise.

Thanks very much.



_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Richard Fazio

Re: Commit upon exiting subprogram
(in response to Mike Baker)
There are techniques to created a called module that will open a
connection, leave it open and allow re-entry to perform other work.

Call OPEN
Call Function1
Call Function2
Call CLOSE

The issue may be linkage in the program (you may have to statically link
the called modules into your compiled Easytrieve program). But you can
try this approach simply by writing a tiny test routine that does these
three functions.

This way, you can control commit.

But the $64 is...why Easytrieve? Keep in mind, I've been using
Easytrieve Plus since it came out and am a HUGE fan (wrote some code
this morning).

Perhaps if you explain what you want to do in the Easytrieve, as well as
inside the called module, etc we can get a better sense of your
requirements.

Thanks,
faz

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Mike Baker
Sent: Wednesday, November 25, 2009 5:15 AM
To: [login to unmask email]
Subject: [DB2-L] Commit upon exiting subprogram

Hi,

We have Easytrieve Plus, but we do not possess the "Easytrieve Plus /
DB2"; we only have the plain (vanilla) version and also the DLI version.

We would like to be able to access DB2 from plain (vanilla) Easytrieve.
(PS:
or via the DLI version, if this might be better.)

One way of doing this would be for the Easytrieve program to call an
Assembler/COBOL subprogram, which would handle all of the SQL.

However, its my understanding that upon exiting the subprogram, that all
of
the DB2 work will be committed. And... this could be a potential
problem.

Is there some way around this?? Please advise.

Thanks very much.



_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our
website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Ted MacNEIL

Re: Commit upon exiting subprogram
(in response to Richard Fazio)
>However, its my understanding that upon exiting the subprogram, that all of
the DB2 work will be committed. And... this could be a potential problem.

>Is there some way around this?? >Please advise.

Why don't you want the commit?
It's there to 'harden' any changes and guarantee the integrity of any updated tables.
-
Too busy driving to stop for gas!

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Mike Baker

Re: Commit upon exiting subprogram
(in response to Ted MacNEIL)
Richard,

Cheers, thanks for this. We'll try out this technique, or rather someone else
will... Not quite sure what they'll do with the Easytrieve yet, but we just
wanted further clarification on this issue (for the moment). My arrival at the
party is late.

After second thoughts, our guys might actually be coding DLI Easytrieve,
rather than vanilla, so it could potentially involve both IMS & DB2 updates.
This would be the reason behind the concern with commit control.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Richard Fazio

Re: Commit upon exiting subprogram
(in response to Mike Baker)
Ah, I was wondering why the reference to "DLI" specifically.

Again, not sure the love of Easytrieve. It only uses dynamic SQL (can't code a singleton select)...at least under the releases of Easytrieve+ I've used. I can't spell IMS so, I'm can't help there...but there's this new language called "Cobol". It works great with both and from what my idol Grace Hopper says, it's the bomb :)

If you have some funky reporting requirements that are driving you to Easytrieve, you can always create an extract file from Cobol and feed that into Easytrieve report writer....or if the Easytrieve is the driver use the Easytrieve process to create a file of "unit of work requests" for your Cobol program to process after the fact as a second jobstep.

My 2¢.

Happy Thanksgiving!
faz



-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Mike Baker
Sent: Wednesday, November 25, 2009 1:02 PM
To: [login to unmask email]
Subject: Re: [DB2-L] Commit upon exiting subprogram

Richard,

Cheers, thanks for this. We'll try out this technique, or rather someone else
will... Not quite sure what they'll do with the Easytrieve yet, but we just
wanted further clarification on this issue (for the moment). My arrival at the
party is late.

After second thoughts, our guys might actually be coding DLI Easytrieve,
rather than vanilla, so it could potentially involve both IMS & DB2 updates.
This would be the reason behind the concern with commit control.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Stan Hoey

Re: Commit upon exiting subprogram
(in response to Richard Fazio)
I'm not sure if I missed something here, but if you are using DLI
Easytrieve running under the IMS-DB2 attachment code, you won't be able
to issue a COMMIT in your sub-program. The IMS-DB2 attachment disallows
it.

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Mike Baker
Sent: Wednesday, November 25, 2009 7:02 PM
To: [login to unmask email]
Subject: Re: [DB2-L] Commit upon exiting subprogram

Richard,

Cheers, thanks for this. We'll try out this technique, or rather someone
else will... Not quite sure what they'll do with the Easytrieve yet,
but we just wanted further clarification on this issue (for the moment).
My arrival at the party is late.

After second thoughts, our guys might actually be coding DLI Easytrieve,
rather than vanilla, so it could potentially involve both IMS & DB2
updates.
This would be the reason behind the concern with commit control.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our
website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L