View previous topic :: View next topic
|
Author |
Message |
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Hi All,
When i try to read a VSAM file through a key i am getting VSAM File status is 92(DOING IN WRONG MODE) and i have declared the VSAM file as
Code: |
SELECT XXXXXX ASSIGN TO XXXXXX
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS XXXXX-NO
STATUS IS WS-FILE-STATUS.
|
This is how i am reading VSAM File
Code: |
READ XXXXXX
KEY IS XXXXX-NO
END-READ
|
i have declared
01 WS-FILE-STATUS PIC 9(02).
Please help me to fix the issue |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
A 92 is a "logic error".
Did you verify the open was successful? |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Hi Dick,
How can i check that |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
By looking at WS-FILE-STATUS immediately after the OPEN is issued. |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Hi Dick,
Before reading the vsam file the file status(WS-FILE-STATUS) is 00 once it reads the WS-FILE-STATUS is 92. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Before reading the vsam file the file status(WS-FILE-STATUS) is 00 |
This needs to be immediately after the OPEN rather than merely before the READ. 00 may be moved to the file status before the read somewhere in the code.
Will some other program successfully open & read this vsam file? Is this a new file, new progrem, etc? Does the 92 happen on the first read?
Also, try to change this "STATUS IS WS-FILE-STATUS. " to "FILE STATUS IS WS-FILE-STATUS. " |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Hi Dick,
Thanks for your support. the problem was vsam file has been declared as 300 while creating and in the file section it is declared as 50. i am really sorry for wasting your time |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Anand,
Quote: |
i am really sorry for wasting your time
|
Not to worry. . . If this is the worst "time" for the year it will be an incredibly good year
Good to hear it is working. The next step would have been to look at the idcams definition and the fd.
Thanks for letting us know it is working
d |
|
Back to top |
|
|
|