IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

TWA variable having junk value after the SYNCPOINT ROLLBACK?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Tue May 13, 2014 7:59 pm
Reply with quote

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.

Code:

                    IF WS-ROLLBACK-SW = 'Y'                     
                       INITIALIZE WS-TCR-COPY1 
                       MOVE TCRFWADS TO WS-TCR-COPY1     
                      EXEC CICS                               
                            SYNCPOINT ROLLBACK                 
                       END-EXEC                                 
                       PERFORM 1000-TRNSCTN-WRKAREA         
                               THRU 1000-TRNSCTN-WRKAREA-EXIT           
                       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.

1000-TRNSCTN-WRKAREA.                         
                                                   
     EXEC CICS ADDRESS                             
          TWA(ADDRESS OF  TRANSACTION-WORK-AREA)
     END-EXEC.                                     
                                                 
     EXEC CICS                                     
          ASKTIME ABSTIME(WS-HOLD-TIME)           
     END-EXEC.                                     
     EXEC CICS FORMATTIME                         
          ABSTIME (WS-HOLD-TIME)                   
          DATESEP ('/') MMDDYYYY(WS-CURRENT-DT)   
          YYDDD   (WS-CURR-DATE)                   
     END-EXEC.                       
    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.

1000-TRNSCTN-WRKAREA-EXIT.
    EXIT.                     


LINKAGE SECTION.

01 TCRFWADS SYNCHRONIZED.


WORKING STORAGE SECTION.

01 WS-TCR-COPY1 SYNCHRONIZED.   
//*Structure corresponds to 01 TCRFWADS structure in linkage section
     02  WS-TCR-COPY1A.
           …….
           …….




[/quote]

Thanks in advance.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Tue May 13, 2014 11:47 pm
Reply with quote

This is strange. The only thing I can suggest is to issue a GETMAIN and move the TWA to this GETMAIN area before the ROLLBACK and then, restore the TWA from the GETMAIN area and FREEMAIN this storage.

You should issue the ADDRESS TWA to establish addressability before restoring the TWA from the GETMAIN area.

Also, copy/save the TWA addresses before and after the ROLLBACK. They should not be different.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts FILE STATUS - 39 ON VARIABLE LENGTH V... COBOL Programming 2
No new posts Unable to display comp variable COBOL Programming 4
No new posts IWS/TWS build dinamic or variable APp... IBM Tools 0
No new posts Determine what library member is in, ... JCL & VSAM 9
No new posts filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
Search our Forums:

Back to Top