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

INVREQ during ENDBR


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

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Mon Apr 14, 2008 4:18 pm
Reply with quote

Hi,

I am receiving INVREQ during ENDBR. I checked key value and its same. Can anyone please jelp me to solve this problem ?

Facts : We have changed the generation field in file key field from 1 byte to 3. Reading file for the same record is successful.


Thanks & Regards,

Ranjit
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: Mon Apr 14, 2008 4:34 pm
Reply with quote

Did you issue a STARTBR and it was successful, followed by the READNEXT or READPREV command?

Could a previous ENDBR have already been issued?

Please post your EIBRESP and EIBRESP2 values.

Regards,

Bill
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Mon Apr 14, 2008 5:00 pm
Reply with quote

Yes , STARTBR, READ and READNEXT was successful. No, no previous ENDBR was executed.

Sorry at the moment my boss is working on that dataset thus I am unable to provide more information. Though during prevoious run it showed me Command : ENDBR and Response : INVREQ

Will post more information as soon as the dataset is released.

Thanks,
Ranjit
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: Mon Apr 14, 2008 6:26 pm
Reply with quote

Your reply indicates that you're issuing a STARTBR, then a READ and then a READNEXT?

If you issue a READ (as opposed to a READNEXT or READPREV) while you're in BROWSE mode, the CRP (current record pointer) will no longer be valid and the well-known IBM condition "unpredictable results may occur" will most likely be raised.

In order to perform a READ while you're in BROWSE mode, you must issue a ENDBR first.

You must also save the current KEY value in WS, so you can begin the BROWSE again (STARTBR) after you're finished with the randomly read record.

To begin browsing again, move the last byte of the key to the last byte of redefined binary-fullword, add 1 to the fullword and move the binary-fullword last byte back to your WS key's last byte.

Code:

03  WS-RECORD-KEY PIC  X(12).
03  WS-FWORD      PIC  9(08) BINARY.
03  WS-FWORD-X    REDEFINES WS-FWORD
                  PIC  X(04).
*
MOVE ZERO                TO WS-FWORD.
MOVE WS-RECORD-KEY (12:) TO WS-FWORD-X (4:).
ADD  1                   TO WS-FWORD.
MOVE WS-FWORD-X (4:)     TO WS-RECORD-KEY (12:).

In the above example, if the last byte was equal to '9' (X'F9'), it becomes a SOFA' after the addition, which then allows VSAM to point to the next logical record.

However, if the last byte was equal to X'FF' (an oddity, most likely), you would then move bytes 11-12 of WS-RECORD-KEY to bytes 3-4 of WS-FWORD-X, add 1 to WS-FWORD and store it back in WS-RECORD-KEY, bytes 11-12.

Regards,

Bill
Back to top
View user's profile Send private message
ranjitbhingare

New User


Joined: 30 Nov 2005
Posts: 94
Location: PUNE

PostPosted: Tue Apr 15, 2008 11:31 am
Reply with quote

Thanks issue is resolved.

It was logical error, ENDBR was getting executed before STARTBR due to silly mistake in IF condition.

Thanks,

Ranjit
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 ENDBR Abend with INVERQ 23 CICS 6
No new posts VSAM Response code 16 for ENDBR CICS 4
No new posts In CICS--> ENDBR is accompanied wi... CICS 4
No new posts INVREQ on STARTBROWSE CICS 2
No new posts Abend INVREQ in return with the trans... CICS 3
Search our Forums:

Back to Top