View previous topic :: View next topic
|
Author |
Message |
sancraig16
New User
Joined: 27 Mar 2018 Posts: 26 Location: usa
|
|
|
|
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 |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
 |
sancraig16
New User
Joined: 27 Mar 2018 Posts: 26 Location: usa
|
|
|
|
It was the incorrect length issue. Thanks Robert ! |
|
Back to top |
|
 |
|