INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

error 39,52

error 39,52

(OP)
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??

RE: error 39,52

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

RE: error 39,52

(OP)
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.

RE: error 39,52

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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close