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
 

 

VSAM File status is 92 - Doing in wrong mode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: VSAM File status is 92 - Doing in wrong mode
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

Site Director


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

PostPosted: Fri Mar 06, 2009 10:53 am    Post subject:
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    Post subject: Reply to: Doing in wrong mode
Reply with quote

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

Site Director


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

PostPosted: Fri Mar 06, 2009 10:57 am    Post subject:
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    Post subject: Reply to: Doing in wrong mode
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

Site Director


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

PostPosted: Fri Mar 06, 2009 11:32 am    Post subject:
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    Post subject: Reply to: Doing in wrong mode
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

Site Director


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

PostPosted: Fri Mar 06, 2009 11:54 am    Post subject: Reply to: Doing in wrong mode
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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