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

VSAM File status is 92 - Doing in wrong mode


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Mar 06, 2009 10:22 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 06, 2009 10:53 am
Reply with quote

Hello,

A 92 is a "logic error".

Did you verify the open was successful?
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Mar 06, 2009 10:55 am
Reply with quote

Hi Dick,
How can i check that
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 06, 2009 10:57 am
Reply with quote

Hello,

By looking at WS-FILE-STATUS immediately after the OPEN is issued.
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Mar 06, 2009 10:58 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 06, 2009 11:32 am
Reply with quote

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
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Mar 06, 2009 11:42 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 06, 2009 11:54 am
Reply with quote

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 icon_smile.gif

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 icon_wink.gif

d
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top