Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
INVREQ during ENDBR

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
Author Message
ranjitbhingare

Active User


Joined: 30 Nov 2005
Posts: 68
Location: PUNE

PostPosted: Mon Apr 14, 2008 4:18 pm    Post subject: INVREQ during ENDBR
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
References
PostPosted: Mon Apr 14, 2008 4:18 pm    Post subject: Re: INVREQ during ENDBR Reply with quote

Bill O'Boyle

Active User


Joined: 14 Jan 2008
Posts: 258
Location: Orlando, FL, USA

PostPosted: Mon Apr 14, 2008 4:34 pm    Post subject: Re: INVREQ during ENDBR
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

Active User


Joined: 30 Nov 2005
Posts: 68
Location: PUNE

PostPosted: Mon Apr 14, 2008 5:00 pm    Post subject:
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

Active User


Joined: 14 Jan 2008
Posts: 258
Location: Orlando, FL, USA

PostPosted: Mon Apr 14, 2008 6:26 pm    Post subject: READ or READNEXT?
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

Active User


Joined: 30 Nov 2005
Posts: 68
Location: PUNE

PostPosted: Tue Apr 15, 2008 11:31 am    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1