Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Issue with rewrite a file

 
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: Tue Jul 31, 2012 4:51 pm    Post subject: Issue with rewrite a file
Reply with quote

I got an issue in rewrite a file.
File length = 100
actual key length = 10
partial key length (WS-FILE-KEY) = 3

step1 :

read a file with a partial key in update mode to
rewrite
Code:

EXEC CICS READ                         
     UPDATE                           
     FILE   ('file name')               
     INTO   (cop-book area)         
     RIDFLD (WS-FILE-KEY)             
     LENGTH  (WS-FILE-LENGTH)         
     KEYLENGTH (LENGTH OF WS-FILE-KEY)
     GENERIC                           
     RESP   (WS-RESPCODE)             
END-EXEC.   


after read update i just update the fields from wrokin storage variables.


step2:
tryig to rewrite the file
Code:

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



but i am getting EIBRESP 21 eibresp2 110

but i have coded length correctly
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jul 31, 2012 5:23 pm    Post subject:
Reply with quote

i can understand why you are confused.

this is a CICS issue, not a COBOL issue.

start from this post
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jul 31, 2012 5:55 pm    Post subject:
Reply with quote

Moved to CICS.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Jul 31, 2012 6:00 pm    Post subject: Reply to: Issue with rewrite a file
Reply with quote

Sorry for "jumping the gun" with the delete, Robert :-)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jul 31, 2012 6:01 pm    Post subject:
Reply with quote

WHY do you think this is a length issue? I see nothing to indicate a length problem -- your response code is ILLOGIC, meaning you're trying to do a REWRITE when it isn't possible to do one.

What are the EIBRESP and EIBRESP2 fields from the READ for UPDATE command you did? Since you cannot change the key value between the read for update and the rewrite, and you used a GENERIC key instead of a full key, just how are you planning on providing the generic key portion to do the REWRITE (hint: CICS doesn't support generic keys for REWRITE)?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jul 31, 2012 6:02 pm    Post subject:
Reply with quote

No problem, Bill -- we got this one moved to the right place.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jul 31, 2012 6:56 pm    Post subject:
Reply with quote

Bill,
thx for the 'DELETE',
saved me from another of my flames!

IMUO:

In CICS do not use HANDLEs. Access and process the return codes (resp and resp2).
problem with HANDLE is that each HANDLE is for a specific code,
and if your API CALL returns an UN-HANDLEd condition, off you go executing illogical statements.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Tue Jul 31, 2012 7:45 pm    Post subject: Reply to: Issue with rewrite a file
Reply with quote

You're specifying the full-keylength so why do you need GENERIC?

Get rid of GENERIC and try it again....
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us