Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File status code 9/057

Status
Not open for further replies.

Patrik68

Programmer
Jul 28, 2004
3
SE
Hi,

In a multi-user COBOL-system running in 16-bit DOS, GDT/Microfocus, on Windows 2000 server, I'm occasionally getting the strange file-status-code 9/057.

I found the below information on several sites:

***
048-057 Host file status, not an RTS message

If you have COBFSTAT environment variable set to HOSTSTAT, this is a mainframe file status code "9x", where x is given by subtracting 48 from the error number.
***

As far as I can see, the COBFSTAT environment variable is not set to HOSTSTAT in my environment, but I'm not sure because I don't know exactly where to set any COBFSTAT variable. Even if it would be set, I would fail to find the information saying what the supposedly corresponding mainframe file status code "99" would mean.

Does anyone have a clue about error 9/057, or did anyone hear of this problem before?
 
Do you code file-status in the SELECT?
If so, do you redefine the 2nd position as PIC 9(2) comp-x?
If so, what is the numeric value of that field (only test if the 1st position of file-status equal "9").

Example:
Code:
01  w-file-status.
    03-w-file-status-1     pic X(1).
    03 w-file-status-2     pic X(1).
    03 w-file-status-2-num redefines
       w-file-status-2     pic 9(2) comp-x.
*
    03 w-file-staus-2-disp pic Z(4)9.

if w-file-status-1 equal "9"
   move w-file-status-2-num 
     to w-file-statis-2-disp
   display "Serious I/O error. status 9/"
           w-file-statis-2-disp
end-if.

The value that numeric field can be tested with the help of the following link:
 
Thanks for your reply.

At first, I was of course considering the possibility that I'd done something wrong, so that 9/057 was just my mistaken interpretation of the error. I have then verified in a number of ways that in fact 9/057 really is happening. I tried the program-code you suggested as well, and this too proved the existence of this error.

The error happens in run-time when users perform transactions, so I can see the error-information just in a log-file afterwards. I have constructed this log-file to record any 9/nnn-errors in a text-file. Basically it works as follows:

FILESTATUS is defined in the SELECT-part of the file-definition.

In the program, I use the following code.

01 W-FILESTATUS.
05 W-FILESTATUS-1 PIC X.
05 W-FILESTATUS-2 PIC 99 BINARY.

after WRITE-operation on the file:
IF FILESTATUS NOT = "00"
MOVE FILESTATUS TO W-FILESTATUS
<write W-FILESTATUS-1 and W_FILESTATUS-2 in the log-file>
END-IF

...in the given case resulting in:
9 and 057

The same code of course works for displaying any 9/nnn-errors.

I've reported the 9/057-error to my software-vendor (GDT in Germany), but they were sofar not able to deliver any definite answer, except that they thought the problem is in some way network-related.
 
Network problem... In you 1st post you mention a W2K server. Do the cobolprograms run locally accessing the local disk? Or do werkstations run cobol and access the files on the W2K-serverdisk? If the latter is true, I'd advice to use File Share( It comes with the Micro Focus installation. Cobol accessing networkdrives is not a very stable situation.
 
Yes, the latter is true. Workstations run cobol and access the files on the W2K-serverdisk.

I am well aware that this setup is not very stable (on another separate site we're running it all in a Terminal Server, which has heavily reduced network traffic - and problems).

I'll check your link about File Share. Thanks for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top