View previous topic :: View next topic
|
Author |
Message |
rajeshwarch
New User
Joined: 24 Mar 2008 Posts: 29 Location: mumbai
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Add the additional VSAM file status codes so you can better determine exactly what the issue is. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|