ITEMERR in TSQ Read

Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer
Mainframe_Dev
Posts: 4
Joined: Fri Jan 27, 2023 8:24 pm
Skillset: Mainframe - COBOL, JCL, VSAM, CICS, TELON, Eztrieve
Tools - Endevor, Xpeditor, FileAid, CA7, ESP, Abend Aid
DB - DB2
Referer: Since I Love to Learn Mainframe

ITEMERR in TSQ Read

Postby Mainframe_Dev » Fri Jan 27, 2023 8:47 pm

Hi,

I am getting ITEMERR when my CICS module reads TS Queue.

EXEC CICS READQ TS
QUEUE (QUEUE NAME)
INTO (WORKING VARIABLE)
LENGTH (TSQ-LENGTH)
RESP (RESP-CD)
RESP2 (ESP2-CD)
END-EXEC

EIBRESP throws 26, which is ITEMERR, As per my search ITEMERR occurs in any of the following situations:

The item number specified is invalid (that is, outside the range of item numbers written to the queue).
An attempt is made to read beyond the end of the queue using the NEXT (default) option.

The item number specified in a WRITEQ TS command with the REWRITE option, is not valid (that is, it is outside the range of entry numbers assigned for the queue).
The maximum number of items (32 767) is exceeded.

Mine is READQ, and i didn't use any NEXT to read beyond end of the queue. Can you guide me what else would have caused the trouble?

dneufarth
Posts: 23
Joined: Thu Oct 15, 2009 2:50 am
Skillset: z/os, z/vse
Referer: google search

Re: ITEMERR in TSQ Read

Postby dneufarth » Sat Jan 28, 2023 5:12 am

Don’t you need to specify ITEM?

Mainframe_Dev
Posts: 4
Joined: Fri Jan 27, 2023 8:24 pm
Skillset: Mainframe - COBOL, JCL, VSAM, CICS, TELON, Eztrieve
Tools - Endevor, Xpeditor, FileAid, CA7, ESP, Abend Aid
DB - DB2
Referer: Since I Love to Learn Mainframe

Re: ITEMERR in TSQ Read

Postby Mainframe_Dev » Sat Jan 28, 2023 9:13 am

I don't think so. I didn't see anything which defined the item.

dneufarth
Posts: 23
Joined: Thu Oct 15, 2009 2:50 am
Skillset: z/os, z/vse
Referer: google search

Re: ITEMERR in TSQ Read

Postby dneufarth » Sat Jan 28, 2023 9:38 am


Mainframe_Dev
Posts: 4
Joined: Fri Jan 27, 2023 8:24 pm
Skillset: Mainframe - COBOL, JCL, VSAM, CICS, TELON, Eztrieve
Tools - Endevor, Xpeditor, FileAid, CA7, ESP, Abend Aid
DB - DB2
Referer: Since I Love to Learn Mainframe

Re: ITEMERR in TSQ Read

Postby Mainframe_Dev » Sat Jan 28, 2023 10:22 pm

Those are options, not mandatory to use. My logic didn't use those options. That's what surprising why it throws ITEMERR even no item /net were used.

Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

Re: ITEMERR in TSQ Read

Postby Robert Sample » Sun Jan 29, 2023 4:29 am

If you read the syntax diagram in https://www.ibm.com/docs/en/cics-ts/5.5 ... y-readq-ts you will see that you can specify NEXT or you can specify ITEM(data value). The syntax diagram is written such that you MUST specify one of them. If you don't specify either one, the ITEMERR makes sense -- you haven't done anything to specify from where to do a NEXT, and you haven't specified an ITEM number.

Mainframe_Dev
Posts: 4
Joined: Fri Jan 27, 2023 8:24 pm
Skillset: Mainframe - COBOL, JCL, VSAM, CICS, TELON, Eztrieve
Tools - Endevor, Xpeditor, FileAid, CA7, ESP, Abend Aid
DB - DB2
Referer: Since I Love to Learn Mainframe

Re: ITEMERR in TSQ Read

Postby Mainframe_Dev » Mon Jan 30, 2023 1:06 am

Thanks Rob, This is the logic implemented long back and working well since then (Late 90's). All of a sudden throwing ITEMERR, which is what surprising me. Let me check. Thanks.


  • Similar Topics
    Replies
    Views
    Last post