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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error 39,52

Status
Not open for further replies.

Patten

Technical User
Aug 22, 2002
106
BE
I'm in the process of converting an existing Cobol application which accessed RM/Cobol data files. Now it should access Btrieve v8.0 files. Some programs run without problem, others result in an error 39,52 (keys not correctly defined in Cobol compared to the physical file). However I am accessing the same file in both programs, one without problem, other one resulting in an error. When I compare the keys defined in Cobol with those in Btrieve they are exactly the same.

One thing I am thinking off: in the program causing the error, I am opening a lot of files at the same time: is there a known limit of opened files in Btrieve perhaps??
 
The number of files can be set as part of your overall configuration - but if that was the problem then I think the error would be more specific to that - are the 39 and 52 actual Pervasive/Btrieve return codes as opposed to RM COBOL error codes - the Btrieve definition for 39 and 52 are as follows:

39: A Begin Transaction operation must precede an End/Abort Transaction operation
The application issued an End Transaction (20),or Abort Transaction (21) operation without a corresponding Begin Transaction (19 or 1019) operation. Make sure that each End or Abort Transaction operation in your program is executed only after a successful Begin Transaction operation.

52: An error occurred while writing to the cache
This status code is obsolete in MicroKernel versions 6.0 and later.

While trying to make a cache buffer available, the MicroKernel attempted to write data to a disk from a file that was previously opened in Accelerated mode. The operating system returned an I/O error during the write. This generally indicates a hardware memory problem. Unload and reload Btrieve before you continue.

Pervasive also has a function executer utility that allows you to mimic actual program commands in respect to btrieve accesses
 
No it aren't Btrieve errors: it is one error, being 39,52, being a RM/Cobol error which is returned. I am using in fact the same RM/Cobol code as in the past but now to access Btrieve files. Normally, this RM/Cobol error happens when I am defining wrong keys or so, compared to the Cobol File Description. However the error happens this time on a file which is ok in sense of reading, writing etc. in another program, but in this program I get this error. Since everything works fine with another program, my keys are apparently correctly defined otherwise it wouldn't work in the other program neither.
 
Are both programs accessing the file in the same way? Does one program use direct access on the file and the other program uses sequential reads?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top