Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- forerror

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
forerror
Synopsis
/infobank/programs/share/forerror.for
Description
  Subroutine to translate and display FORTRAN error codes.

       
COMMENTS
  On VMS, to avoid run-away error listings, only the first 5 errors 

     are printed.  It also updates an error log contained in drs$acct 
     named thusly --  todaysdate//programtime//'error.log'
  This error log records the program being executed, the executor, the date
  and time of execution, and the fortran error that occured.
    
  On UNIX, it contains 25 messages, from message 100 to message 124 in
    perror (3f), white book, Unix 4.3 BSD.
    
USAGE
  "a" = argument, "r" = referenced, "s" = set

  
  call forerror                         (with the following arguments)
         ErrorFlag                   [variable i*4 r]
  
  Input:
    ErrorFlag = FORTRAN error code passed to subroutine
    
    
SUBROUTINES
  time                (VAX FORTRAN System routine)  

  date                (VAX FORTRAN System routine)  
  getusrnam           (shared DRS external routine) 
  getjpihed           (shared DRS external routine) 
  stringlen           (shared DRS external routine) 
  errsns              (VAX FORTRAN System routine)  
    
    
FILES_USED
  unit=*(write)

  unit=0(write)
  unit=(p)outputunit(open,write,close)
    
    
DISCLAIMER
  Although this program has been used by the U.S. Geological Survey,

  no warranty, expressed or implied, is made by the Survey as to the
  accuracy and functioning of the program and related program
  material nor shall the fact of distribution constitute any such
  warranty, and no responsibility is assured by the Survey in
  connection therewith.
   
    
AUTHOR
  Clint Steele      5/10/83     Fortran

      diagnostics from Fortran User's Guide p. 7-2.
  Clint Steele      2/12/85     modified for MAT      
  Ed Maple          4/22/87     added error logging   
  Clint Steele      9/23/88     added UNIX error messages   
      based on UNIXERROR.F by Thang Phi      6/10/88     Fortran/Unix
      diagnostics from Perror (3F) white book or
      Appendix A (PS1:3-9) yellow book.
  Clint Steele    9/27/88     Enhanced documentation.
                              Changed construction of LogFile name.
                              Removed RECL = 1024 for UNIX.
                              Changed WRITE (*,...    -->     WRITE (0,
                              Removed 5-times counter for UNIX
  Clint Steele   12/4/95   Removed VMS specific references
  Carolyn Degnan  1/3/00   Added f77 perror messages for codes 1000-1027

    
Reads
Writes
      write (SystemDate, 101) SystemDateTime(10:11),     
     *    SystemDateTime(5:7), SystemDateTime(23:24)     
          write (OutputErrorUnit, 500) ErrorFlag                        
                      write (OutputErrorUnit, 510) 
     *                   ErrorMessage (ErrorFlag-99), 
     *                   ErrorUnit 
                      write (OutputErrorUnit, 510) 
     *                   ErrorMessage (ErrorFlag-971), 
     *                   ErrorUnit 
                      write (OutputErrorUnit, 100) 
     *                   ErrorMessage (ErrorFlag-99) 
                      write (OutputErrorUnit, 100) 
     *                   ErrorMessage (ErrorFlag-971) 
              write (OutputErrorUnit, 530) ErrorFlag
Opens
Calls
          call getusrnam (UserName)
          call getjpihed (ProgramName)
          call stringlen (UserName, LengthUserName)
          call stringlen (ProgramName, LengthProgramNam)
          call stringlen (LogLine, LengthLog)

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/share/forerror.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:36:58 PDT 2013  (chd)