ener.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Bad file mode (ERR: 54)
■ More than one condition can cause this error:
 
  • You attempted to load a file with an invalid format.
    For example, you tried to load a Visual Basic for
    Windows binary form file.
 
  • You tried to load a text file as a binary file, or vice
    versa.
 
  • A PUT or GET statement specified a sequential file.
 
  • A FIELD statement specified a file not opened for random
    access.
 
  • A PRINT # statement specified a sequential file opened for
    input.
 
  • An INPUT # statement specified a file opened for output or
    appending.
 
  • Visual Basic tried to use an include file previously saved
    in binary format. Include files must be saved in text
    format.
 
  • An ISAM statement or function file-number argument refers
    to an open file that is not an ISAM table.
 
  • You are using the CHAIN or RUN statement and errors have
    occurred. For example, the program you ran using the RUN
    statement may contain duplicate procedure names.
 
■ Possible solutions:
 
  • Resave the file in text format and reload as a text file.
 
  • Resave the file in binary format and reload as a binary
    file.
 
  • Verify the correct file criteria for your PUT, GET, FIELD,
    PRINT #, or INPUT # statements.
 
  • Reload the include file, save it in text format, then run
    the program again.
 
  • Make sure all ISAM file references refer to the correct
    file type.
 
  • If you are using the CHAIN or RUN statement, loading
    all files into the programming environment may give
    you additional information on the type of errors
    encountered.
 
■ If you need additional help, move the cursor to a keyword
  and press F1 to open the Help window.