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
 

 

Need vsam return code 92 solution

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rajeshwarch

New User


Joined: 24 Mar 2008
Posts: 29
Location: mumbai

PostPosted: Fri Jun 05, 2009 7:25 pm    Post subject: Need vsam return code 92 solution
Reply with quote

Hi every body,
In my program iam reading a variable length vsam file having max length 650 in dynamic access mode. This file is having multiple record layouts.
the fd section defined like.
FD filename.
01 in-rec.
05 in-key pic x(32).
05 filler pic x(618).

at the time of start browse iam passing a partial key of length 6. after that issuing the Read Next command.

After reading all the records match to the above layout(means key size) it is abending with return code 92.

I think due to record layout it has happening.

plaese can some body clarify me my assumption is wright and what are the ways to handle this return code.
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Jun 05, 2009 8:00 pm    Post subject: Reply to: Need vsam return code 92 solution
Reply with quote

AFAIK, partial-key file STARTS are reserved for CICS (STARTBR with a KEYLENGTH and GENERIC). You need to specify a full-key in Batch.

Just pad the low-order of the full-key with LOW-VALUES and this should meet your requirements.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jun 05, 2009 8:32 pm    Post subject:
Reply with quote

Add the additional VSAM file status codes so you can better determine exactly what the issue is.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Jun 05, 2009 8:55 pm    Post subject:
Reply with quote

START is okay for batch, Bill. As Robert mentioned, define the function code and feedback code for more detailed information whenever the status code is non-zero. Also, always... ALWAYS... check the status code after ALL I/O for files. See Language Reference.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Jun 05, 2009 9:15 pm    Post subject: Reply to: Need vsam return code 92 solution
Reply with quote

Terry,

Yes, but I didn't realize a START with a partial-key was correct in Batch?

If the OP just pads the low-order of the full-key with LOW-VALUES, wouldn't that do the trick?

Regards,
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Jun 05, 2009 10:04 pm    Post subject:
Reply with quote

Yes, that would do the trick. I interpreted your post to mean that the START verb was not valid for batch. My mistake. The entire record key is used for a START and one has to either redefine it, or define it as a group name with elementary fields under it, or use reference modification to set it to the "partial key" value desired.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jun 05, 2009 10:40 pm    Post subject:
Reply with quote

More fully, a file status 92 is a logic error (which hopefully you found in the manual). This could be you trying to read or write a closed file (check for fall-through logic in your program), deleting or rewriting a record without reading it first, reading a file opened for output (or vice versa), or pretty much anything that COBOL and VSAM can't make sense of what you're trying to do.

You need to look closely at your code, especially around where the file status 92 is being generated, and verify the code will process correctly when you've finished reading the records.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EXIT or RETURN cvnlynn CLIST & REXX 9 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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