Highlighted
Absent Member.
Absent Member.
460 views

[archive] Transactional Coding Issue

[Migrated content. Thread originally posted on 24 April 2009]

We have a set of transactional coding that start transaction, opens files, reads files, moves records, closes files & commits. We are getting a 9C-02 error in some cases of this logic but not in all cases. If we get the error we rollback all changes and that all works great so we are not messing up files.

I know that the error is a MAX-LOCKS error, we have increased the MAX-LOCKS environment setting from 500 to 9999 (and lots in between) and the error still happens at the same place every time.

Does anyone have any ideas on how or what to try to fix this issue?
0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

How is the data being accessed.. on Unix ... on Windows ... through AcuServer ... using mapped drives ... using Samba. If you are using anything other than AcuServer I suggest at least trying AcuServer to see if the locking issues go away.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

Data is being accessed directly on the unix server using Thin-Client.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

I take it that you have changed LOCKS_PER_FILE as well?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

Are you setting MAX-LOCKS and LOCKS_PER_FILE in a configuration file?

If you are setting these in a program, put them into a configuration file.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

The limit is controlled by MAX_LOCKS If you do not specify this in the runtime config file it will mirror the MAX_FILES setting.
If you do set it, it is reccomended you set it to at least the same value as MAX_FILES but there is a Maximum limit of 8,191.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

Dilbert if we use a SET ENVIRONMNET statement in the program it will not overwrite the values in the config file for MAX-LOCKS & LOCKS-PER-FILE?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

Thanks Dilbert with you hint we solved the issue. For some reason setting the environment variable inside the program with a SET ENVIRONMENT statement did not work. We put it at the system level in the CBLCONFIG file and everything is golden!!!

Thanks again.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Transactional Coding Issue

There are certain environment variables such as these that must be set in the cblconfig file because the runtime needs them set as it starts. I wish there were a list of those that couldn't be changed later. Anyone know of one?
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.