Skip to main content

File locked (status 9A) when 2 clients open the same indexed file

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

A sample program:

           SELECT          customer

           ASSIGN      TO "\\\\server1\\develop$\\test\\customer.dat";

           ORGANIZATION IS INDEXED;

           ACCESS       IS DYNAMIC;

           RECORD KEY   IS cst-key;

           FILE STATUS  IS ws-cst-status.

.

When the statement "OPEN I-O customer"  is executed the file on one PC works OK.

However, on another PC,  a file locked error (status 9A) occurs.

Resolution:

Change the SELECT statement to:

           SELECT          customer

           ASSIGN      TO "\\\\server1\\develop$\\test\\customer.dat";

           ORGANIZATION IS INDEXED;

           ACCESS       IS DYNAMIC;

           LOCK MODE    IS MANUAL;

           RECORD KEY   IS cst-key;

           FILE STATUS  IS ws-cst-status;

           SHARING WITH ALL OTHER.

This will enable multiple clients to access the indexed file.

Old KB# 5761

#RMCOBOL
#AcuCobol
#COBOL
#netexpress
#ServerExpress

0 replies

Be the first to reply!