Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CICS -REWRITE QUEUE is giving ITEMERR in 9th Record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
avinash pandey

New User


Joined: 10 Apr 2008
Posts: 17
Location: Bangalore

PostPosted: Thu Sep 10, 2009 11:22 pm    Post subject: CICS -REWRITE QUEUE is giving ITEMERR in 9th Record
Reply with quote

I am getting ITEMERR(26) while rewrite in queue at 9th record,

could anybody assist me. here is code -
Code:
PERFORM VARYING WM-ITEM-SUB1 FROM +1 BY +1 UNTIL       
                               WS-SUB1 > +21           
    ADD  WM-ITEM-SUB1     TO WM-ITEM-COUNT             
    MOVE 'CNTR'           TO WN-TRAN-ID               
    MOVE EIBTRMID         TO WN-TERM-ID               
    MOVE PECK-CODEI(WS-SUB1)                           
                          TO WN-TEMP-MCAF-CODE         
    MOVE PECK-SEQUENCEI(WS-SUB1)                       
                          TO WN-TEMP-SEQUENCE         
    MOVE PECK-OLDI(WS-SUB1)                           
                          TO WN-TEMP-OLD               
    MOVE PECK-NEWI(WS-SUB1)                           
                          TO WN-TEMP-NEW               
    EXEC CICS WRITEQ TS                               
      QUEUE     (WN-TEMP-ID)                           
      FROM      (WN-TEMP-STORAGE-AREA)                 
      ITEM      (WM-ITEM-COUNT)                       
      REWRITE                                         
      RESP      (WN-CICS-RESPONSE)                     
      MAIN                                             
    END-EXEC                                           
IF WN-CICS-RESPONSE = DFHRESP(NORMAL)                 
   MOVE ZEROS TO WM-ITEM-COUNT                         
ELSE                                                   
MOVE SPACES TO PECK-MESSAGEO                           
MOVE WN-CICS-RESPONSE TO WM-CICS-RESP-DISP             
STRING '270- FATAL CICS ERROR RE-WRITEQ TS RESPONSE = '
       WM-CICS-RESP-DISP DELIMITED BY SIZE             
       INTO PECK-MESSAGEO                             
GO TO 9000-SEND-RETURN

Code'd
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7996
Location: Bellevue, IA

PostPosted: Thu Sep 10, 2009 11:58 pm    Post subject:
Reply with quote

How do you know it is at the 9th record?
What is the value of WM-ITEM-COUNT?
What is the initial value of WM-ITEM-COUNT before your PERFORM loop starts?

You need to post using BBcode to make the code more readable, too.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Sep 11, 2009 1:25 am    Post subject: Reply to: CICS -REWRITE QUEUE is giving ITEMERR in 9th Recor
Reply with quote

Issue a READQ TS before the REWRITE, specifying NUMITEMS, which will return the number of items in the TSQ.

Can other tasks access this TSQ simultaneously?

If this is true, then you're going to need ENQ/DEQ logic in ALL programs/tasks which access this TSQ, to ensure proper serialization.

For Threadsafe compliant programs, ENQ/DEQ would be mandatory.

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us