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: 7936
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 CICS to Webservices safexc CICS 1 Sun Jan 22, 2017 5:49 pm
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts INDEPENDENT CICS TS 4.1 MRO REGION UP... Kyle Carroll CICS 0 Wed Dec 14, 2016 6:55 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm


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