Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8154
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: 2504
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 FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Need to track the CICS transaction fr... sam8051 CICS 3 Mon Aug 07, 2017 3:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us