home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************************
- *
- * Name: DUMPERRS.prg
- * Description: Utility to dump the ERRORLOG.dbf and TRACE.dbf files
- * created by the MYERR.prg Error System routine
- * Author: Philip H. Schwartz
- * Audience: Nantucket DEVCON '90
- * Written: June 6, 1990
- * Compiler: Clipper 5.0 V7.7 BETA
- * Comp Option:
- * Linker: RTLink Version 1.3 (Clipper)
- * Library: clipper, extend
- * Obj Module:
- * Link input: rtlink fi dumperrs out dumperrs li clipper,extend
- * Headers: STD.ch
- * Copyright: (c) 1990 Philip H. Schwartz
- * Rights: All Commercial & Publishing Rights Reserved
- *
- *********************************************************************/
-
- CLS
-
- /* Check for presence of ERRORLOG.dbf and TRACE.dbf. Quit
- if not there. */
- IF !FILE('errorlog.dbf') .OR. !FILE('trace.dbf')
- ? "ErrorLog.dbf and/or Trace.dbf are MISSING."
- ENDIF
-
- /* Open ERRORLOG.dbf in a new select area and INDEX on ID field */
- USE errorlog NEW
- IF LASTREC()=0
- ? "ErrorLog is EMPTY."
- USE
- RETURN
- ENDIF
- INDEX ON errnum TO errorlog
-
- /* Open TRACE.dbf in a new select area and INDEX on ID field */
- USE trace NEW
- INDEX ON errnum TO trace
-
- SELECT errorlog
-
- DO WHILE .NOT. EOF()
- CLS
- IF errnum>0
- ? STR(errnum,14)+" "+DTOC(termdate)+" "+termtime+" "+;
- trim(procname)+"["+LTRIM(STR(procline,8))+"]"
- ? "VERS="+STR(version,7,2)+" EXE LEVEL="+STR(exelevel,7,3)+;
- " MEMORY: (T="+STR(memtot,4)+"K, B="+STR(memblock,4)+;
- "K, R="+STR(memrun,4)+"K)"
- ? "MSG->:"+text
- SELECT trace
- SEEK errorlog->errnum
- DO WHILE errorlog->errnum=trace->errnum
- ? SPACE(3)+"Called from "+procname+'['+LTRIM(STR(procline,8))+']'
- SKIP
- ENDDO
- SELECT errorlog
- INKEY(0)
- ENDIF
- SKIP
- ENDDO
- CLOSE DATABASES
- RETURN
- /*EOF*/