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

Resolve File Status Code 90 in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Thu Sep 20, 2007 11:14 am
Reply with quote

Hi,

Any body please give me solution to resolve the File Status 90

Thanks
Vijayakumar
Back to top
View user's profile Send private message
snehalpatel

New User


Joined: 13 Sep 2007
Posts: 37
Location: India

PostPosted: Thu Sep 20, 2007 11:33 am
Reply with quote

vijay_bn79 wrote:
Hi,

Any body please give me solution to resolve the File Status 90

Thanks
Vijayakumar


Description for File Status is : 'SOME TYPE OF VSAM LOGIC ERROR'
Sometimes we may get this error For Non-Vsam Files ..
Please check whether DD name in Program matchs with the name in Run JCL.

Common Causes of File Status Code 90
File Not Opened: Attempting to perform a file operation (READ, WRITE, REWRITE, DELETE) without opening the file first.
Incorrect File Operation: Trying to perform an operation that is not allowed for the current file status (e.g., trying to read a file that is opened for output).
File Attribute Mismatch: Discrepancies between the file attributes specified in the COBOL program and those of the actual file (e.g., record length, file organization).

Troubleshooting Steps

Check File Open Statements: Ensure the file is properly opened before any operation. For reading, the file should be opened with INPUT or I-O mode.

Verify File Operations: Confirm that the operations performed are allowed for the file's current status.

For reading: OPEN INPUT InputFile
For writing: OPEN OUTPUT InputFile
For updating: OPEN I-O InputFile

File Attribute Mismatch: Ensure that the file attributes in the COBOL program match the actual file attributes. This includes record length, file organization, and access mode.

Check for Initialization: Make sure that any file operations are performed after the file is properly initialized and opened.
Back to top
View user's profile Send private message
anv2005

New User


Joined: 14 Jul 2005
Posts: 44
Location: US

PostPosted: Fri Sep 21, 2007 11:18 pm
Reply with quote

The file status key value 90 may indicate that DFSMS had failed to perform an OPEN, CLOSE, READ or WRITE request. DFSMS issues one or more error messages to aid in problem diagnostic and return control back to COBOL program.

Check the JESMSGLG file on the job's output/held queue for any system or DFSMS message, e.g. IEC143I.

Regards,
Alex.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Sep 21, 2007 11:34 pm
Reply with quote

Hello,

Quote:
Any body please give me solution to resolve the File Status 90
If you post something to work with, someone may have suggestions.

Post your select, fd, open, the jcl for this step and the diagnostic informatin presented. Use copy/paste rather than keying.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Sep 22, 2007 3:38 am
Reply with quote

vijay_bn79 wrote:
Any body please give me solution to resolve the File Status 90
Simple, add the second six byre value for the file status and find EXACTLY what VSAM is complaining about...Awaiting your information.... icon_lol.gif
Back to top
View user's profile Send private message
saptagiri kintali

New User


Joined: 21 Sep 2007
Posts: 20
Location: chennai

PostPosted: Mon Sep 24, 2007 12:34 pm
Reply with quote

@cics GUY
wat do you mean by second six byre pls
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Sep 24, 2007 1:02 pm
Reply with quote

data-name-8
Represents information returned from the file system. Since the definitions are specific to the file systems and platforms, applications that depend on the specific values in data-name-8 might not be portable across platforms.
Data-name-8 must be defined as a group item of 6 bytes in the working-storage or linkage section of the Data Division.
Specify data-name-8 only if the file is a VSAM file (that is, ESDS, KSDS, RRDS).
Back to top
View user's profile Send private message
snehalpatel

New User


Joined: 13 Sep 2007
Posts: 37
Location: India

PostPosted: Mon Sep 24, 2007 1:40 pm
Reply with quote

saptagiri kintali wrote:
@cics GUY
wat do you mean by second six byre pls


Hope this Example helps :

Code:
 FILE-CONTROL.
     SELECT VSAM-FILE ASSIGN VSAMFILE
        ORGANIZATION IS INDEXED
        ACCESS MODE  IS SEQUENTIAL
        RECORD KEY   IS VSAM-RECORD-KEY
        FILE STATUS  IS VSAM-STATUS-CODE
                        VSAM-EXTENDED-STATUS-CODE.

 DATA DIVISION.
 FILE SECTION.

 FD  VSAM-FILE.
 01  VSAM-RECORD.
     05  VSAM-RECORD-KEY         PIC X(20).
     05  VSAM-EMPLY-INFO           PIC X(60).

 WORKING-STORAGE SECTION.

 01  VSAM-STATUS-CODE.
     05 VSAM-STATUS-CODE-BYTE1   PIC X.
     05 VSAM-STATUS-CODE-BYTE2   PIC X.

 01  VSAM-EXTENDED-STATUS-CODE.
     05 VSAM-EXTENDED-RETURN-CODE   PIC S9(4) COMP.
     05 VSAM-EXTENDED-FUNCTION-CODE PIC S9(4) COMP.
     05 VSAM-EXTENDED-FEEDBACK-CODE PIC S9(4) COMP.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Sep 24, 2007 6:22 pm
Reply with quote

Hello,

Now that we see the definition, we also need to see the values received by your program.
Back to top
View user's profile Send private message
sriramvempaty

New User


Joined: 02 Aug 2007
Posts: 18
Location: india

PostPosted: Wed Sep 26, 2007 12:34 pm
Reply with quote

Hi Snehal,

I think the format of select clause should be corrected.

you coded as : SELECT VSAM-FILE ASSIGN VSAMFILE


Correct format : SELECT VSAM-FILE ASSIGN TO VSAMFILE


Hope this will solve your problem.

Regards,
Sriram.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts Big Five Personality Test in COBOL - ... COBOL Programming 0
No new posts I wrote a Hallmark Movie Plot Generat... COBOL Programming 0
No new posts COBOL Text Adventure Engine for TK4- ... COBOL Programming 0
Search our Forums:


Back to Top