Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

getting EIBRESP=16 EIBRESP2=30

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

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 2:56 pm    Post subject: getting EIBRESP=16 EIBRESP2=30
Reply with quote

i am getting error in rewrite function. i have done the below steps


step1:

Code:


EXEC CICS READ                       
     UPDATE                           
     FILE   ('file name')             
     INTO   (FILE-AREA)       
     RIDFLD (WS-FULL-KEY)             
     LENGTH (WS-FILE-LENGTH)         
     KEYLENGTH (LENGTH OF WS-FULL-KEY)
     RESP   (WS-RESPCODE)             
END-EXEC.
                             


The read update is fine and it return code as zero.

STEP2:

TRYING TO REWRITE

Code:


EXEC CICS REWRITE             
     FILE   ('file name')     
     FROM   (FILE-AREA)
     LENGTH (WS-FILE-LENGTH) 
     RESP   (WS-RESPCODE)     
END-EXEC.                     



getting error while rewriting

getting EIBRESP=16 EIBRESP2=30

Thanks in advance.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 01, 2012 3:29 pm    Post subject:
Reply with quote

'INVREQ' code returned = D2X(16)
Quote:

INVREQ
RESP2 values:

30
A REWRITE command is issued without a token and no previous READ for UPDATE (also without a token) can be found.

A possible reason for the previous READ for UPDATE not being found is that it failed for some reason, and the failure has not been correctly handled or has been ignored.


1. RESP codes can be found here:
The above quoted document further wrote:

EIBRESP2
contains more detailed information that may help explain why the RESP condition occurred. This field contains meaningful values, as documented with each command to which it applies


suggest you save the url for EIB FIELDS

by the way, how are you getting the RESP2 value
since you have not coded the API CALL to return it to your program?

If indeed your READ for UPDATE was error free,
you are dong something to the file between the READ and REWRITE.
as far as the 'token' thing is concerned, either look-it-up for wait for someone else to respond.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 01, 2012 3:38 pm    Post subject:
Reply with quote

you are not changing anything in the key are you?
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 4:00 pm    Post subject:
Reply with quote

Hi Dick,

My problem is, I am having partial key alone and the full key are storing in linkage variable.. Before read update i moved the full key into actual file key...after that i am updating some non key variable in file and then trying to rewrite the file..
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 4:15 pm    Post subject:
Reply with quote

Hi Dick,

I need the link which you got the below info

Quote:

INVREQ
RESP2 values:

30
A REWRITE command is issued without a token and no previous READ for UPDATE (also without a token) can be found.

A possible reason for the previous READ for UPDATE not being found is that it failed for some reason, and the failure has not been correctly handled or has been ignored.


But the link which you gave contains just few info about EIBRESP2. I need detail info for each code as you mentioned. Can you please provide that link?

Thanks in advance
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 01, 2012 4:24 pm    Post subject:
Reply with quote

as documented with each command to which it applies
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 4:27 pm    Post subject:
Reply with quote

Thanks Dick for your quick reply.

Please help me in rewrite issue also...

Is it possible to rewrite a file with partial key Since i am updating the key values?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 01, 2012 4:34 pm    Post subject:
Reply with quote

i don't understand how a READ with a partial key,
with the alternatives EQUAL and GTEQ where EQUAL is the default,
works.

so, other than provide links, i am out of this discussion.

you never explained how you arrive at the RESP2 value.
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 4:38 pm    Post subject:
Reply with quote

Sorry Dick, as you said the read step is not fine..it return as record not found..so that only i got resp2 as 30 in rewrite step...

I heard we can read a file with partial key with GENERIC option. Is it possible to rewrite a VSAM KSDS file after updating its key value?

I am having a VSAM KSDS file key which contains 5 fields.In that we can update all the fields other than 1st field.

So is it possible read that file with 1st field and update other 4 fields even they are key fields with REWRITE function.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Aug 01, 2012 4:42 pm    Post subject: Reply to: getting EIBRESP=16 EIBRESP2=30
Reply with quote

If you review what you asked, you'll surely come to the correct answer.
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 4:49 pm    Post subject:
Reply with quote

Ok Dick...

Just let me know, Is it possible to update a key of KSDS file in a program?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 01, 2012 4:54 pm    Post subject:
Reply with quote

Quote:
Just let me know, Is it possible to update a key of KSDS file in a program?
Uh, no! The key cannot be changed by a REWRITE. If you change even one single byte of the key, you must do a WRITE since that is a new record, it is not an existing record.
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 4:58 pm    Post subject:
Reply with quote

Thank you very much Dick ! icon_smile.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Aug 01, 2012 5:09 pm    Post subject: Reply to: getting EIBRESP=16 EIBRESP2=30
Reply with quote

Are you just calling everyone Dick?

If you want to "logically" rewrite the record (so you have to insert a new record), remember to delete the original as well.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 01, 2012 5:17 pm    Post subject:
Reply with quote

Quote:
Are you just calling everyone Dick?


maybe he is calling everyone a dick,
since he has been treating us like one.
Back to top
View user's profile Send private message
Gopalakrishnan V

Active User


Joined: 28 Jun 2010
Posts: 102
Location: chennai

PostPosted: Wed Aug 01, 2012 7:10 pm    Post subject:
Reply with quote

Oh i am really sorry! Thank you all icon_smile.gif
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 110
Location: Puerto Rico

PostPosted: Wed Aug 01, 2012 7:45 pm    Post subject: Reply to: getting EIBRESP=16 EIBRESP2=30
Reply with quote

Good day to all!

On the read, move the 'UPDATE' after the file-name and add a GTEQ because you using a partial key. On the rewrite, eliminate the 'RESP'. Let us know if it worked.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 01, 2012 8:01 pm    Post subject:
Reply with quote

Jose: your suggestions won't work, and taking the RESP off is bad coding practice, anyway. As previously posted, the o/p is attempting to change part of the key (past the generic read part) and hence the REWRITE cannot, under any circumstances, work.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 01, 2012 10:13 pm    Post subject:
Reply with quote

I feel that the TOKEN concept is a very underutilized parameter.

it is similiar to the ID used in ISPF LMM... routines
and HANDLE in MQS.

I say similar because TOKEN refers to a RECORD
where as the ISPF ID refers to the file/PDS/PDSE
and MQS refers to the QUEUE within a QUEUE Manager.

For some reason, many do not understand.

Still, as Robert (and everyone else) has said,
regardless,
you can not rewrite a record with a different key,
because that would be a write (insert).
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 EIBRESP 13 on Alternate Index amitc23 CICS 7 Wed Feb 18, 2015 6:33 pm
No new posts How do I get the Response from EIBRESP Robert.Barnes COBOL Programming 1 Sat Oct 25, 2014 9:21 am
No new posts eibresp = 16 and eibresp2 = 28. abhishek chhawcharia CICS 1 Fri Apr 25, 2014 9:37 pm
No new posts CICS eibresp 22 while reading VSAM Fi... abhishek chhawcharia CICS 18 Tue Apr 22, 2014 1:38 am
No new posts CICS EIBRESP 22 and EIBRESP2 13 picus_mf CICS 2 Thu Nov 14, 2013 6:19 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us