How do you show file status in Cobol?

How do you show file status in Cobol?

To define and use the file status information the following is required. A FILE STATUS field needs to be specified within the SELECT statement of a COBOL program. SELECT QSAM0080-FILE ASSIGN to QSAM0080 ORGANIZATION is SEQUENTIAL ACCESS MODE is SEQUENTIAL FILE STATUS is QSAM0080-STATUS.

What is file status 48 in cobol?

Hi, The file status 48 occurs because of the following reason: The execution of a WRITE statement was attempted on a file not open in the I-O, output, or extend mode. Check the mode of the file opened.

What does 02 file status code indicate?

Code Statements

What is file status 90 in Cobol?

file status 90 Unsuccessful OPEN, READ, WRITE or CLOSE operation. You missed to initialize the file before OPEN, READ or WRITE statement.

What is error Cobol?

At a minimum, coding an error message to identify an error condition is a good idea. When you run an ILE COBOL program, several types of errors can occur. The ILE COBOL statement active at the time of a given error causes certain ILE COBOL clauses or phrases to be run.

What is file status 92 in Cobol?

The 92 file status code (LOGIC ERROR) indicates you’re attempting to read a NEXT record without having established a current record to read the next record after.

What does Cobol file status 49 indicates?

49. A DELETE or REWRITE operation has been tried on a file that is not opened I-O. 91. For VSAM only.

Where do I find the error codes in COBOL?

Although these error codes are similar to the appendix “I-O Status List” of the “NetCOBOL User’s Guide”, there are differences and these codes are not returned in the FILE STATUS item. Requested to make an entry after the end of a file or before the beginning of a file.

What is the mismatched minimum record length in COBOL?

The file property specified in a parameter or option must match with that of the physical file. Mismatched file organization. The file organization specified in a parameter or option must match with that of the physical file. Mismatched minimum record length.

Why is the relative record number in COBOL invalid?

The record number specified for writing a relative record file was invalid (zero). Specify a value for the relative record number. Writing a record caused the maximum file size to be exceeded. Split the file so that the file does not exceed the maximum file size. The COBOL file system encountered an operating system error.

What does 23 mean on a COBOL file?

Attempt has been made to store a record that would create a duplicate key in the indexed or relative file OR a duplicate alternate record key that does not allow duplicates. 23 Indicates no record found. An attempt has been made to access a record, identified by a key, and that record does not exist in the file.