Skip to content

Sequential File Access Status Code


Q - After the recent update, a user had a problem adding ship-to in Order Entry. The user got the error
    Error 3/005 on Company File.  This may indicate a network problem.


Then the following message appeared:
    Company file not found. Only SUPERVISOR can initialize it.


This user does not have a problem adding ship-to through Ship-To File Maintenance.  Different users do not have problems adding ship-to in Order Entry either.

A - Here is what error code 3/005 means:
                3/005 - An OPEN operation with the I-O, INPUT, or EXTEND phrases have been tried on a non-OPTIONAL file that is not present.
In this case, the error seems to happen when the user tries to open input on <ElliottRoot>\Data\COMPFILE.DAT file and receives this error. I am guessing “open input” because 99% of the time when accessing company files Elliott uses “Open Input.”  Keep in mind that the message says “not present.”  “Not present” could be due to insufficient user rights to access COMPFILE.DAT. It could also be the wrong path for some reason.  

Company File (COMPFILE.DAT) is a sequential file and is not managed by PSQL engine. 

Later on, the party who had this problem responded back that the problem was resolved after copying the user profile to a new user ID. So we think there's some strange reason from the OS side causing this issue.

Below is a complete list of reference error codes when accessing sequential files:

0/000 - Succesful completion
0/002 - Duplicate Alternate Key
0/004 - The length of the record being processed does not conform to the fixed file attributes for that file.
0/005 - The referenced optional file is not present at the time the OPEN statement is executed.
0/007 - Sequential files only. For an OPEN or CLOSE statement with the REEL/UNIT phrase the referenced file is a non-reeel/unit medium.
1/000 - No next logical record exists. You have reached the end of the file.
1/004 - Relative files only. The number of significant digits in the relative record number is larger than the size of the relative key data item described for that file.
2/001 - For sequentially accessed files only: indicates a sequence error. The ascending key requirements of successive record key values have been violated or the prime record key value has been changed by a COBOL program between successful execution of a READ statement and execution of the next REWRITE statement for that file.
2/002 - For indexed and relative files only, indicates a duplicate key condition. 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.
2/003 - Indicates no record found. An attempt had been made to access a record, identified by a key, and that record does not exist in the file. Alternatively START or READ operations have been tried on an optional input file that is not present.
2/004 - Relative and indexed files only: Indicates a boundary violation arising from one of following conditions:
3/000 - The I/O Statement was unsuccessfully executed as the result of a boundary violation for a sequential file or as the result of an I/O error, such as a data check parity error, or a transmission error.
3/004 - The I/O operation failed because of a boundary violation. This condition indicates that an attempt has been made to write beyond the externally defined boundaries of a sequential file.
3/005 - An OPEN operation with the I-O, INPUT, or EXTEND phrases has been tried on a non-OPTIONAL file that is not present.
3/007 - An OPEN operation has been tried on a file which does not support the open mode specified in the OPEN statement.
3/008 - An OPEN operation has been tried on a file previously closed with a lock.
3/009 - A conflict has been deetected between the fixed file attributes and the attributes specified for that file in the program
4/001 - An OPEN operation has been tried on file already opened.
4/002 - A CLOSE operation has been tried on file already closed.
4/003 - Files in sequential access mode: the last I/O statement executed for the file, before the execution of a DELETE or REWRITE statement, was not a READ Statement.
4/004 - A boundary violation exists.
4/006 - A sequential READ operation has been tried on a file open in the INPUT or I-O mode but no valid next record has been established.
4/007 - A READ or START operation has been tried on a file not opened in the INPUT or I-O.
4/008 - A WRITE operation has been tried on a file not opened in the OUTPUT, I-O, or EXTEND mode or on a file opened I-O in the sequential access mode.
4/009 - A DELETE or REWRITE operation has been tried on a file that is not opened I-O.
9/xxx - Extended file status code. See separate section on the detail of xxx.

xxx
001 - Insufficient buffer space. On OS/S, could indicate that the SWAPPATH indicates an out of memory situation.
002 - File not open with access tried.
003 - Serial mode error.
004 - Illegal file name.
005 - Illegal device specification.
006 - Attempt to write to a file opened for input.
007 - Disk space exhausted.
....

EMK

Feedback and Knowledge Base