Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

RMS$_SEQ error

 
SOLVED
Go to solution

RMS$_SEQ error

Hi,
I met following problem:
I have variable length indexed file (dir/full information for this file is attached).
This file is opened by group of processes (at this moment 5), that sometimes append and update records. To open, append and update operations processes use only RMS servises: sys$open, sys$connect, sys$update, sys$put - not fopen and fwrite.
During tests I sometimes find that sys$put service fails with code RMS$_SEQ (1500 successfull appends and 40 randomly distributed failures). I printed record fields that I append and it seems everything is ok.

Everything I found on RMS$_SEQ error is (from comments to sys$connect service):


For indexed files, RMS verifies that the first record is inserted in the proper sort
order. If the record cannot be inserted in the proper sort order because of user
action, RMS returns a sequence error (RMS$_SEQ).


OpenVMS documentation on sys$put mentiones that RMS$_SEQ can occur but says nothing when and why.
I feel that problem is not about coding bugs (of course I may be wrong) but about configuration.

Thank you
Sergejus
2 REPLIES
David B Sneddon
Honored Contributor
Solution

Re: RMS$_SEQ error

Sergejus,

$ HELP/MESSAGE SEQ/FACILITY=RMS


SEQ, primary key out of sequence (SEQ access)

Facility: RMS, OpenVMS Record Management Services

Explanation: An RMS $PUT service specifies sequential access, but the
primary key value of the record is less than the previous
record entered. $PUT operations in sequential access mode must
be in ascending order of primary key value.

User Action: Modify the program, if necessary, to detect and respond to
the condition. Use the $PUT system service to put records in
ascending order of the primary key value.

The above would tend to indicate that you are accessing
the file in sequential access mode rather than
random access mode. Are you setting the correct
attributes for the open?

Dave

Re: RMS$_SEQ error

Many thanks to David.
Of course it was my fault. I found the place where I am swithing to RAB$C_SEQ without restoring RAB$C_KEY ! It was the good lesson for me :).

Have a nice day.
Sergejus