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

Code:

MQ PROCESS FAILED

"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

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.

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?