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

getting EIBRESP=16 EIBRESP2=30


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
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
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
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
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
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
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
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
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
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 01, 2012 4:42 pm
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
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 01, 2012 4:54 pm
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
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 01, 2012 5:09 pm
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
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
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: 121
Location: Puerto Rico

PostPosted: Wed Aug 01, 2012 7:45 pm
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 01, 2012 8:01 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts EIBRESP=16 and EIBRESP2=25 while doi... CICS 2
No new posts EIBRESP =16 & EIBRESP2 = 01 while... CICS 3
No new posts EIBRESP 13 on Alternate Index CICS 7
No new posts How do I get the Response from EIBRESP COBOL Programming 1
No new posts eibresp = 16 and eibresp2 = 28. CICS 1
Search our Forums:

Back to Top