IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CICS EIBRESP 22 and EIBRESP2 13


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 52

PostPosted: Thu Nov 14, 2013 6:19 pm
Reply with quote

I am trying to read a KSDS VSAM file which is of Fixed length with 31660 length. My goal is to read this VSAM file sequentially and process the records present in it. So doing a START BROWSE with low-values in the key and then doing READNEXT.

The start browse is working fine with RESP code 0 but the READNEXT is failing with EIBRESP 22 and EIBRESP2 13 (length error).

Code:

77 WS-IP-RBIV-LENGTH       PIC S9(9) COMP VALUE 31660.
77 WS-MMWCRBIV-KEY-LEN     PIC S9(4) COMP VALUE +22.   

EXEC CICS STARTBR                     
     DATASET   ('MMWCRVIV')           
     RIDFLD    (MM-WCIV-KEY)           -> key length is 22
     KEYLENGTH (WS-MMWCRBIV-KEY-LEN)   
     GTEQ                             
     END-EXEC.                         
SKIP1                                 

EXEC CICS READNEXT               
     DATASET ('MMWCRVIV')         
     RIDFLD  (MM-WCIV-KEY)       
     LENGTH  (WS-IP-RBIV-LENGTH)   - length is 31660
     INTO    (WS-MMWCRBIV-RECORD)
END-EXEC.                         


Not sure what is the actual wrong I have done.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Nov 14, 2013 6:42 pm
Reply with quote

Field "WS-IP-RBIV-LENGTH" needs to be defined as PIC S9(4) COMP VALUE 31660.

Because you're assigning a VALUE clause to this field (and the VALUE exceeds the Picture Clause size), you can either specify the TRUNC(BIN) compiler option (to avoid high-order truncation) or define this field as COMP-5 (Native Binary), providing your compiler supports this.

The TRUNC option has no effect on COMP-5.

Most lengths (but not all) in CICS API's are halfword-binary, as illustrated.
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 52

PostPosted: Thu Nov 14, 2013 7:03 pm
Reply with quote

Yes. Issue is resolved. Thanks a lot.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top