Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
E1BRESP 22 while doing readnext

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

New User


Joined: 27 Mar 2018
Posts: 26
Location: usa

PostPosted: Tue Sep 01, 2020 1:17 am    Post subject: E1BRESP 22 while doing readnext
Reply with quote

Hello,

I am trying to read a VSAM KSDS file sequentially and getting EIBRESP 22 .

length of key is 28 and I am moving first 20 to do a partial read.

EXEC CICS STARTBR

DATASET ('AMTFILE')
RIDFLD(WS-AMT-KEY)
GTEQ
RESP(RESP-CODE)

END-EXEC


MOVE LENGTH OF WS-AMT-REC TO WS-AMT-REC-LEN

EXEC CICS READNEXT

DATASET ('AMTFILE')
INTO(WS-AMT-REC)
RIDFLD(WS-AMT-KEY)
LENGTH(WS-AMT-REC-LEN)
RESP(RESP-CODE)

END-EXEC


WS-AMT-REC-LEN is declared with COMP-5 PIC 9(4).
WS-AMT-KEY has a length of 80.


I added the MOVE statement above after looking at solution for a similar error here.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8560
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 01, 2020 2:32 am    Post subject: Reply to: E1BRESP 22 while doing readnext
Reply with quote

From the manual on the READNEXT EIBRESP codes:
Quote:
22 LENGERR
RESP2 values:
10 Neither the LENGTH nor the SET option is specified for a file with variable-length records or a BDAM file with undefined-format records.
11 The length of the record read with the INTO option specified exceeds the value specified in the LENGTH option; the record is truncated, and the data area supplied in the LENGTH option is set to the actual length of the record.
13 An incorrect length is specified for a file with fixed-length records.
Default action: terminate the task abnormally.
So your easiest path forward is to look at the EIBRESP2 value and see which of these three conditions applies, and proceed accordingly.
Back to top
View user's profile Send private message
sancraig16

New User


Joined: 27 Mar 2018
Posts: 26
Location: usa

PostPosted: Wed Sep 02, 2020 9:34 pm    Post subject:
Reply with quote

It was the incorrect length issue. Thanks Robert !
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 Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Problem in READNEXT amitc23 CICS 6 Wed Mar 16, 2016 12:06 pm
No new posts How to update the sequence of record ... Gopalakrishnan V CICS 2 Wed Sep 26, 2012 8:21 pm
No new posts RIDFLD value changes in READNEXT iliganon CICS 3 Thu Jun 10, 2010 12:16 pm
No new posts STARTBR and READNEXT problem Robert Sample CICS 5 Thu Apr 22, 2010 7:55 am

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