Calling RPG from Visual Basic - Commitment Control does not work

Calling RPG from Visual Basic - Commitment Control does not work

Post by Lucas Whi » Fri, 15 Nov 2002 04:56:58



Hi,

Has anyone had any experience calling RPG from VB with VB handling
commitment control?  When I call SQL stored procedures from VB and
call a Rollback from my ADO connection in my VB code, the rollback
works fine.  However, when I call an RPG program that updates data and
call a Rollback from my ADO connection in my VB code, the data updated
by the RPG is not rolled back.  When I look at the journal, there is
no Start Commitment Control or Begin Commitment Control (and obviously
no Rollback).

The activation group of the RPG is set to default activation group
(I've tried caller too without success - should be same anyway).  I've
tried different isolation levels on my VB connection as well.

Any ideas?

Thanks,
Lucas

 
 
 

Calling RPG from Visual Basic - Commitment Control does not work

Post by Charles Wil » Fri, 15 Nov 2002 05:21:41


RPG's been around longer than commitment control.  Thus, it doesn't
default to using commitment control as SQL does.

You need to make sure that the files you are using in RPG are marked for
commitment control.  Make sure the COMMIT keyword appears on the file's
F-spec line.

Also, when calling an RPG program from a 5250 command line you need to
issue the STRCMTCTL command to establish the commitment definition.  I
_believe_ that in your scenario this would not be required since I assume
that you've already established the commitment definition via ADO.

HTH,
Charles



Quote:> Hi,

> Has anyone had any experience calling RPG from VB with VB handling
> commitment control?  When I call SQL stored procedures from VB and
> call a Rollback from my ADO connection in my VB code, the rollback
> works fine.  However, when I call an RPG program that updates data and
> call a Rollback from my ADO connection in my VB code, the data updated
> by the RPG is not rolled back.  When I look at the journal, there is
> no Start Commitment Control or Begin Commitment Control (and obviously
> no Rollback).

> The activation group of the RPG is set to default activation group
> (I've tried caller too without success - should be same anyway).  I've
> tried different isolation levels on my VB connection as well.

> Any ideas?

> Thanks,
> Lucas


 
 
 

Calling RPG from Visual Basic - Commitment Control does not work

Post by Lucas Whi » Fri, 15 Nov 2002 23:35:52


Thanks for the help, Charles.  A co-worker of mine actually figured
out the COMMIT keyword in the F-spec line this morning, but it's nice
to have it confirmed.  The amazing thing is we've been having this
problem for about a year, and IBM support has failed to give me this
simple answer after hours of back and forth and save files, etc.

Thanks again,
Lucas


> RPG's been around longer than commitment control.  Thus, it doesn't
> default to using commitment control as SQL does.

> You need to make sure that the files you are using in RPG are marked for
> commitment control.  Make sure the COMMIT keyword appears on the file's
> F-spec line.

> Also, when calling an RPG program from a 5250 command line you need to
> issue the STRCMTCTL command to establish the commitment definition.  I
> _believe_ that in your scenario this would not be required since I assume
> that you've already established the commitment definition via ADO.

> HTH,
> Charles



> > Hi,

> > Has anyone had any experience calling RPG from VB with VB handling
> > commitment control?  When I call SQL stored procedures from VB and
> > call a Rollback from my ADO connection in my VB code, the rollback
> > works fine.  However, when I call an RPG program that updates data and
> > call a Rollback from my ADO connection in my VB code, the data updated
> > by the RPG is not rolled back.  When I look at the journal, there is
> > no Start Commitment Control or Begin Commitment Control (and obviously
> > no Rollback).

> > The activation group of the RPG is set to default activation group
> > (I've tried caller too without success - should be same anyway).  I've
> > tried different isolation levels on my VB connection as well.

> > Any ideas?

> > Thanks,
> > Lucas

 
 
 

1. STRPCCMD should not work but does; RUNRMTCMD should work but does not

According to the documentation (Client Access Family) the way to run a PC
command from an AS/400 session is STRPCCMD for DOS, Windows 3.1 and OS/2.
For Windows 95/NT one should use RUNRMTCMD.  However, on my PC (Windows 95,
twinax, NetSoft router, CA V3R1M2, OS/400 V3R2) STRPCCMD does work but
RUNRMTCMD does not.

For RUNRMTCMD the daemon program AREXECDN.EXE should be running on the PC.
This has been installed on the PC, but when I start it, it does not seem to
do anything.  No information, no process running.  When I try RUNRMTCMD from
an AS/400 session, the job log says that the remote system 'did not
recognize the transaction program' (quoting from memory).

Any ideas why STRPCCMD appears to be unsupported?  Will it suddenly vanish
in a future release?  Will it not work with TCP/IP (not with V3R1M2 anyway;
the session is not recognized as a PC session)?

Any ideas how I could get RUNRMTCMD to work?

Joep Beckeringh

2. Halftone screens on print colours

3. Visual RPG or Visual Basic and ODBC?

4. Atari 1200XL - Some questions

5. Calling AS400 pgm with CA/400 OLE DB & Visual Basic

6. LAME 3.70 patch for RISC OS uploaded

7. Error Calling a CL program from Visual Basic

8. OS/2 Updates?

9. commitment control in ile rpg question

10. RPG Locking with commitment control

11. Visual Basic Data Environment with OLE DB for AS/400 not working ?

12. Prompt override program does not work properly

13. Does F9 not work for QSECOFR