1) I have 3 programs : PGMA, PGMB, PGMC. PGMA calls PGMB
and PGMB calls PGMC. I have to do inserts, updates in all
the 3 pgms.

2) Say PGMC has done its work successfully and returned to
PGMB

3) PGMB had an SQL error while doing some update

4) PGMA has already done some updates before calling PGMB

all are running under the same CICS region.

What will happen if I issue SYNCPOINT ROLLBACK in PGMB when
it abends ? Does all the changes in PGMA,B,C rollback ?
(because all the pgms belong to same task).

Answer Posted / akbar.

SYNCPOINT ROLLBACK will rollback to the last COMMIT point
that has been made after any update in the same task.
Having said that, if PGMA and/or PGMC, in this case have
updated the database, has/have used COMMIT after their
respective updates, then ROLLBACK of PGMB after abend would
return to the very recent COMMIT made by either of the two
programs PGMA or PGMC.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is db2 optimizer?

867


What is runstats utility in db2?

679


What is the physical storage length of date data type?

853


What is the difference between bind and rebind in db2?

1003


What are the prerogatives?

700






Define db2 and its databases?

706


What are the benefits of using the db2 database?

759


Is db2 a mainframe?

677


before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?

1807


What are the different types of base tables?

655


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

746


What do you mean by cursor?

681


Is schema the same as database?

716


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2381


SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.

2264