We are using the SYNCPOINT ROLLBACK in one of our CICS program. After the execution of rollback statement, TWA variables have junk values though we assign the address and try to refer the storage again.
IF WS-ROLLBACK-SW = 'Y'
MOVE TCRFWADS TO WS-TCR-COPY1
MOVE WS-TCRMAPNAME TO TCRMAPNAME
//*We just wanted to force the value to see whether it is getting picked up. For sample we used one variable. All the TWA variables are not being recognized itself. TWA variables still have junk values.
INITIALIZE TCRFWADS TWA-COMMAREA
//*---- Initializing is also not working.
MOVE WS-TCR-COPY1 TO TCRFWADS
//*TCRFWADS – 01 level of TWA variable
//*TCRMAPNAME – is one of the TWA variable in Linkage section .
//*WS-TCRMAPNAME – is one of the working storage variable in working storage section mirroring the Linkage section TWA variables.
EXEC CICS ADDRESS
TWA(ADDRESS OF TRANSACTION-WORK-AREA)
EXEC CICS FORMATTIME
DATESEP ('/') MMDDYYYY(WS-CURRENT-DT)
MOVE MET-TWA-TCR-POINTER TO WS-TCRBAR.
SET ADDRESS OF TCRFWADS TO WS-TCRBAR-PTR.
MOVE TCR-MED-MAP-POINTER TO WS-MAPBASE1.
SET ADDRESS OF BASE-AREA TO WS-MAPBASE1-PTR.
01 TCRFWADS SYNCHRONIZED.
WORKING STORAGE SECTION.
01 WS-TCR-COPY1 SYNCHRONIZED.
//*Structure corresponds to 01 TCRFWADS structure in linkage section