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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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