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

Need vsam return code 92 solution


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Jun 05, 2009 8:00 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 05, 2009 8:32 pm
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Jun 05, 2009 9:15 pm
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
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 05, 2009 10:40 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top