View previous topic :: View next topic
|
Author |
Message |
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Hi all,
I have three programs A,B,C
A ==> Main driver cics program which links B and calls C dynamically
B ==> CICS program which process data in tables
C ==> MQ routine which would be called for every MQ operation ( open,put,close)
Now the major driver CICS program A does some process and links B and inserts some records to tables
The program B actually does "EXEC CICS SYNCPOINT END-EXEC" if SQLCODE of table process is 0
So My table has data like
Code: |
PROGRAM STARTED
PROGRAM FIRST HALF WITHOUT ERRORS |
"The records are actually commited"
and later it calls program C and suppose if open of MQ fails I again link
program B and try to process the tables and the table process was successful and returns back to A where since the MQ process failed I do a SYNCPOINT ROLLBACK
As a table record I try inserting
"The records inserted after calling MQ program has not commited"
So its like
My table at the end it has data
Code: |
PROGRAM STARTED
PROGRAM FIRST HALF WITHOUT ERRORS |
I have two questions here
1.If my first set of records are actually inserted before MQ program call why didnt it insert a record after MQ failure when data insertion was succesful
2.SYNCPOINT ROLLBACK should rollback all the data till the previous syncpoint why didnt it happen that way??
If my doubts are wrong I guess there is some serious problems with my understanding
Could someone please help me out?? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you should have the logic to do a syncpoint or rollback in the same place.
keep in mind, the idea of RRSAF
(where you have more than one resource,
in this case DB2 and MQS)
you want a 'commit' or 'rollback' decision based on 'unit of work'.
if the MQS write is based on a successful completion of DB2 process,
you should do the sycnpoint after the MQS write
and not
afer the DB2 process
otherwise, you have divided a unit-of-work, which you should not do.
now, as to your question about what is or is not there after commit and rollback,
insure that you are using RRSAF.
if you are not using RRSAF, then that is another conversation, for another time.
as to why you are performing what should be a batch process in cics,
let the fact that i made the comment suffice as a negative critique.
and last but not least, forget the fact that you have 3 programs,
IT IS ONE TASK,
and work is accomplished in a task, and not a program.
if it helps,
just think as the linked-to and CALLed program as just two more paragraphs within the mainmodule. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Yes Dick
Thanks I understand your point but say there is a requirement that I need to inform certain users that MQ has been failed due to some reason may be like when MQs are down after DB2 process
Yes I do agree with you I need to consider things "1 Unit of work"
How to acheieve that?? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you never answered my question about RRSAF.
the 1 unit of work decision is based on your answer to that.
Do you have it installed and implemented?
as far as as informing users that something is not available,
i prefer to notify those who are responsible for insuring that a service is available.
as to notifying the user, how are you communicating with them now?
i have no idea about what your process actually does.
is it screen driven by a user, where you have essentially one transaction? |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Yes RRSAF is installed nd yeah one unit of work gets done after writing to MQ
No its,not a screen but a web page which calls A |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if the unit of work is complete when mqs is written,
then that is when the syncpoint should be taken either commit or rollback.
when then webpage invokes cics transaction,
how many db2 processes and mqs processes are expected for each invocation?
This thread:
ibmmainframes.com/about55525.html
last two post are of interest. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Yes RRSAF is installed nd yeah one unit of work gets done after writing to MQ
No its,not a screen but a web page which calls A |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Was there some reason to re-post your previous reply?
I suspect it would have been more productive to answer the question from DBZ as well as comment on the link provided. . .
d |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Oops Apologies my mistake I guess I am in need of break badly I never know why I replied that
For each webpage invocation. I process webpage atleast three times and write to MQ just once
I did see that link long back when the other Dick |
|
Back to top |
|
|
|