HP OpenVMS Systems

ask the wizard
Content starts here

Debugging reserved operand fault? (ROPRAND)

» close window

The Question is:

I am trying to convert the binary data in existing sequential RMS to comma
 separated ASCII text files.  To do so I have written a simple Fortran (Digital
 Fortran 77 V6.5-188) program that reads the binary data and does formatted
 writes to the ASCII file.
 The program was written in a couple of loops to simplify its use.  The first
 loops reads the input file name from sys$input until an EOF.  The second loop
 sequentially reads the records from the specified input file, does some
 minimal verification that t
he date is valid, and writes selected fields to the ASCII file.  The problem is
 that in processing a few of the files the program fails with the following
%SYSTEM-F-ROPRAND, reserved operand fault at PC=00018525, PSL=03C00004
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name     routine name         line       rel PC    abs PC
                                               00018525  00018525
                                               000267AB  000267AB
                                               00024AFF  00024AFF
VAX2APIGI       VAX2APIGI            1290      000003B4  000013B4
Line 1290 is:
             write (16,10200,ERR=400)
   *                          cdate,K1FPAE,K1AAAE,K1ANKL,K1ARMM,
   *                          K1FNOT,K1ARTV,K1ARTM,K1ARPW,K1ARPT,
   *                          K1ARTK,K1FTAE,K1FTLA,K1ASCN,K1AESH,
   *                          K1AUSN,R1TA8V,R1TB2V,R1GAGE,K1BMCS,
   *                          K1BRLS,K1BRRS,K1BTTL,K1BTLS,K1BTRS,
   *                          R1FATI,R1FMFI,R1FPFI,R1FTMM,R1FASM,
   *                          K1FNFS,R1FTFM,K1FTKC,K1FCAG,K1FCSL,
   *                          K1FCSN,K1FCSR,R1FTTT,K1FTUC,K1FTSC,
   *                          K1FTCN,K1GTOF,K1GTON,K1GLIN,R1TADD,
   *                          R1SODA,R1TRGT,R1MVGA,R1MVFE,R1MVSI,
   *                          R1MVNA,R1MVZN,K1NKAS,R1NCCR,R1RSPP,
   *                          K1GPOT,R1RNSP,R1REAM,R1RCAA,
   *                          R1RCAR,       R1RCAV,R1RASM,R1RLTM,
   *                          R1RNSM,R1RSTR,R1RSTM,R1RNPM,R1RTRM,
   *                          R1TTTM,K1FTSC,R1FIFO,K1FTUC
I have tried a couple of different format statements for this write.  The one
 used in the code above is the original and should format the data correctly.
I am fairly confident that the code is correct since it run correctly in most
 cases.  I have some suspicion that the trouble lies in the data itself.  Over
 the years, some of the data structure has changed slightly even though the
 record length remained
 the same.  The type of change that I am talking about would be something like
 two integers that were no longer used becoming spare words and later the
 spares becoming a real.  Or vice versa.
For the most part, the changes noted above seem to only cause problems with
 bogus values in the ASCII.  This usually shows up a an overflow of the format
 for that particular variable so that we get a field full of *.
All of this is being done on a VAX 4000/400 running OpenVMS Version 6.2.
I would greatly appreciate any help you could give to help me to correct this
 problem.  If I have left out any needed info I would be glad to supply it.

The Answer is :

  Please use the OpenVMS Debugger, and particularly please use the debugger
  to examine the record data involved when your program encounters one of
  these ROPRAND failures.
 ROPRAND,  reserved operand fault at PC='location', PSL='xxxxxxxx'
  Facility:     SYSTEM, System Services
  Explanation:  An instruction contains an operand in a format that is not
                acceptable. This message indicates an exception condition and
                is usually followed by a display of the condition arguments,
                registers, and stack at the time of the exception.
  User Action:  Check for a programming error. Examine the PC and virtual
                address displayed in the message to determine the instruction
                that caused the error.

answer written or last revised on ( 28-AUG-2001 )

» close window