IBM V7R3.

Running an SQL stored proc on Machine A (MA) that executes a stored proc on Machine B (MB). Both machines are on V7R3.

When I submit the CL program to batch on MA it runs perfectly, and MB data is updated.
When I run a batch CL program that calls the above CL program, I get a rollback message and updates are lost on MB.

On MA, submit CL program to batch.
CL Program logic:
1. Swap User profile to super user on MB
2. RUNSQL to call Stored Proc on MA
3. MA Stored proc
1. Call QCMDEXC on MB to call a CL to change libl
2. Call Stored Proc on MB to update data on MB
4. restore user profile

Again, If I submit the MA CL directly to batch the job runs and updates data on MB with no issue.
When I call the CL from another batch CL I get this message in the joblog:

Message . . . . : Pending changes rolled back for remote resources; reason
01.
Cause . . . . . : Pending changes are being rolled back while ending
commitment definition QILE with logical unit of work identifier
APPN.MBIBOOKS.X'3E398C6C5A39'.00001. There were pending changes for 0
protected remote resources and 0 unprotected remote resources. The reason
codes and their meanings follow: 01 -- The commitment definition is in a
state of Reset. 02 -- The commitment definition is in a state of Prepare In
Progress. 03 -- The commitment definition is in a state of Prepared and the
Action If Endjob commitment option is W. 04 -- The commitment definition is
in a state of Prepared and the Action If Endjob commitment option is W. The
rollback decision was received from the initiator of this logical unit of
work. 05 -- The commitment definition is in a state of Last Agent Pending
and the Action If Endjob commitment option is W. 06 -- The commitment
definition is in a state of Last Agent Pending and the Action If Endjob
commitment option is WAIT. The rollback decision was received from the last
agent. 07 -- The commitment definition is in a state of Rollback Required.

And the data on MB is not updated.
The CL that is running that calls the CL in question is doing this call as the last step in the job. The next statement is ENDPGM.

In both cases the user profile that runs the jobs is the same user.



Paul


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.