HP OpenVMS Systems

ask the wizard
Content starts here

RMS and RTB record too large errors?

» close window

The Question is:

When using the DIFFERENCES command to compare files, I run into a limitation
 that I have not been able to find documented. Some of the files contain
 records as much as 700 bytes in length. This causes the following error
 message to display:
-RMS-W-RTB, 700 byte record too large for user's buffer.
Is this limitation inherent to the way DIFFERENCES works, or is there a
 system/user setting that could be modified to handle these long records?

The Answer is :

  The DIFFERENCES utility -- like many other older OpenVMS tools -- has
  a relatively small default record buffer specified, but will allocate
  a large buffer based on the attributes of the target files.  Notably,
  DIFFERENCES will use the 'longest record length' setting associated
  with the target file.  Some files -- notably stream files imported from
  other operating systems -- may not have that value set, or may have the
  value set incorrectly.
  You can verify the value with the DCL commands:
    $ WRITE SYS$OUTPUT F$FILE(file-name,"LRL")
  You can alter the value with the DCL command:
  For example:
    $ copy a.tmp b.tmp
    $ set file/attributes=(mrs=0,lrl=0) a.tmp
    $ differences a.tmp b.tmp
    %DIFF-F-READERR, error reading A.TMP;1
    -RMS-W-RTB, 888 byte record too large for user's buffer
    $ set file/attributes=(mrs=0,lrl=1000) a.tmp
    $ differences a.tmp b.tmp
    Number of difference sections found: 0
    Number of difference records found: 0
    $ write sys$output f$file("a.tmp","LRL")
  Bonus question:  Why do some files with larger records and with incorrect
  LRL settings appear to work correctly?
  Answer: several OpenVMS utilities request direct use of the record from
  within the RMS I/O buffer (default size: eight kilobytes). If the record
  fits entirely within one RMS buffer, then the utility can process the
  data directly from within the buffer.  If the record spans a buffer
  boundary, then the record buffer can be used.

answer written or last revised on ( 16-OCT-2001 )

» close window