What is a file status code in COBOL?
The FILE STATUS clause allows naming a data item used in getting information about the success/failure of input-output operations performed on the file. When the FILE STATUS clause is specified, the system moves a value into the file-status-key data item after each input-output operation performed to the file.
What does COBOL file status 49 indicate?
A WRITE operation has been tried on a file not opened in the OUTPUT, I-O, or EXTEND mode, or on a file open I-O in the sequential access mode. 49. A DELETE or REWRITE operation has been tried on a file that is not opened I-O. 91. For VSAM only.
What is file status 22 mean?
22. Primary duplicate Key found. 23. Record not found or File not found.
What is a status file?
The FILE STATUS clause monitors the execution of each input-output operation for the file. When the FILE STATUS clause is specified, the system moves a value into the file status key data item after each input-output operation that explicitly or implicitly refers to this file.
What is status 23 in VSAM?
The reason for File status 23 is as follows – Invalid key for a VSAM indexed or relative file; no record found. Solution: Check the key value is defined for VSAM indexed file or not.
How do I open a KSDS file in Cobol?
To open a file that has never contained records (an empty file), use a form of the OPEN statement. Depending on the type of file that you are opening, use one of the following statements: OPEN OUTPUT for ESDS files. OPEN OUTPUT or OPEN EXTEND for KSDS and RRDS files.
What is FD in COBOL?
In a COBOL program the file description entry (FD) represents the highest level of organization in the File Section. The FILE SECTION header is followed by a file description entry consisting of a level indicator (FD), a file-name and a series of independent clauses.
Why is my IAM file not working in COBOL?
This file status generally implies a mismatch between the defined IAM file attributes and the record layout in the COBOL program. For example, possible causes are the key length or offset from the file definition do not match the COBOL record layout.
What is a successful execution in COBOL?
Quick References for IBM Mainframe Programming COBOL FILE STATUS CODES: File status Codes beginning with a ‘0’ are considered Successful Execution.
What does open for input only mean in COBOL?
Improper OPEN of an empty (unloaded) file, such as open for input only. This file status generally implies a mismatch between the defined IAM file attributes and the record layout in the COBOL program. For example, possible causes are the key length or offset from the file definition do not match the COBOL record layout.