Lieutenant Commander
Lieutenant Commander
507 views

file share and automatic lock

I'm using Indexed-file with LOCK MODE IS AUTOMATIC,

also, I have these directives 

    $set ans85 comp

     $SET AUTOLOCK FILESHARE

 

the file opened as i-o,

the file contains these records keys:  1,  5, 12

my issue:

if user1 working on record no 5,, user2  can't add new record no 4

0 Likes
6 Replies
Micro Focus Expert
Micro Focus Expert

Can you please provide some more detail.

"if user1 working on record no 5,, user2  can't add new record no 4"

What does "working on" mean"? does this mean that user1 has successfully read the record and has it locked?

What happens when user2 tries to write the record with key = 4? What is the file status that is returned?

 

0 Likes
Lieutenant Commander
Lieutenant Commander

User 1 has successfully read the record no 5 and has it locked.

at this time User 2 has filled all required data for new record no 4 which is not existing yet when he wants to this save his work and create the new record (record 4)  he can’t do it until User 1 releases record no 5 or exit from this program,,

when user 2 tries to write the record with key = 4 the file status that is returned:

File status 9/068 record locked

0 Likes
Micro Focus Expert
Micro Focus Expert

I cannot reproduce this behavior using Net Express with wrappack 18 installed. The write from user2 is successful. You should never get a locked record status on a write statement. Even if the record already exists and it is locked it should return an invalid key condition file status 22.

Which product and version number are you using?
Are you setting any file configuration options in an EXTFH.CFG file?

0 Likes
Lieutenant Commander
Lieutenant Commander

The product is Netexpress ver 5.1 
No, I'm not setting any file configuration options in an EXTFH.CFG file,,

 

 

0 Likes
Micro Focus Expert
Micro Focus Expert

I cannot reproduce the problem that you report.

Do you have any updates applied to the 5.1 base release? If you look in the Net Express Help under About what is the full version number that is displayed?

Under what operating system is the application running?
Where does the indexed file reside? Is this on the local system to which users are logging in or is it on a network drive accessible as a share?

I would recommend that if you have a current maintenance contract with Micro Focus that you open up a support incident with Customer Support. We will most likely need a small repro program that demonstrates the issue so we can run it in-house.

Thanks

0 Likes
Lieutenant Commander
Lieutenant Commander

First of alI i really do appreciate your follow-up and support.

Netexpress 5.1 version 5.105.0076

the applications running as client server application: the server running under Windows Server 2012 R2 Standard ver .using Flexus product ((Thin Client application)), all data and applications installed in the server side, nothing reside on the client except some dlls belongs to Flexus Thin client to connect to the Server

Client Pcs running under Windows 10 and 7.

Unfortunately, I don’t have a valid current maintenance to open a, support incident

I’ve used sharing files and locks quite many, but I didn’t face this issue, I may have done something not correct, I will review and trace my codes,, but if you have  a sample program  creating and updating indexed-file using sharing file with locking and unlock, I will take as a guide  to me to review my source.

Best regards

 

 

 

 

 

Rply

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.