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: 8055
Location: East Dubuque, Illinois, USA

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 IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts CICS Transaction Timeout Hooman24 CICS 2 Sun Apr 16, 2017 2:16 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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