home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / DBMTRA.ZIP / DBMTRACE.INF (.txt)
OS/2 Help File  |  1991-07-02  |  18KB  |  689 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. PREFACE ΓòÉΓòÉΓòÉ
  3.  
  4. This document describes the TRACE component of the Database Manager and the 
  5. Query Manager products and it's usage. 
  6.  
  7. This documentation was prepared for Release 1.2 and can be used with Release 
  8. 1.3. 
  9.  
  10.  DBM TRACE COMPONENT OVERVIEW 
  11.  
  12.  
  13. ΓòÉΓòÉΓòÉ 2. DBM TRACE COMPONENT OVERVIEW ΓòÉΓòÉΓòÉ
  14.  
  15. The OS/2 System Trace Facility is used by the DBM Product as a problem 
  16. determination tool. 
  17.  
  18. It helps in developing and debugging by the way of recording the flow and 
  19. dumping required data to study the problem. 
  20.  
  21. In order to use the OS/2 System Trace Facility, the TRACEBUF parameter must be 
  22. specified in the CONFIG.SYS file. This parameter specifies the size of the 
  23. system trace buffer in 1K increments. The default size is 4k and a maximum size 
  24. of 63K can be specified. We recommend using 63K. 
  25.  
  26. The trace buffer is used as a circular list to hold the latest trace records 
  27. that fit. This trace buffer is memory resident. 
  28.  
  29. The OS/2 system trace buffer can be formatted and captured to a file using the 
  30. OS/2 TRACEFMT command. 
  31.  
  32. The major and minor trace codes are in hexadecimal and the trace data is in 
  33. hexadecimal. 
  34.  
  35. Additional formatting can be done for the DBM trace records by post processing 
  36. the output from the TRACEFMT command using the SQLTFMT program. 
  37.  
  38. DBM has been allocated 16 major OS/2 trace codes numbered 176 to 191. See the 
  39. list on the following page for the major trace codes currently defined. 
  40.  
  41. Tracing may be started or stopped only at the major trace code level by using 
  42. the OS/2 TRACE command. 
  43.  
  44. For example, the command 
  45.  
  46.  
  47.         TRACE ON 176,180,181
  48.  
  49. would start tracing for major trace codes 176, 180 and 181. The command 
  50.  
  51.  
  52.         TRACE OFF 176,180
  53.  
  54. would stop tracing for major trace code 176 and 180. 
  55.  
  56. Under no conditions should an unqualified "TRACE ON" be specified either in the 
  57. CONFIG.SYS file or on the OS/2 command line. This would cause all major trace 
  58. codes to be activated and the trace buffer would be filled up with all the base 
  59. operating system trace records and other subsystem trace records. The Database 
  60. Manager and Query Manager trace records would be lost as these other trace 
  61. records may overwrite the earlier records because of the circular nature of the 
  62. buffer. 
  63.  
  64. OK, under certain conditions it may be advisable to use TRACE ON for very short 
  65. periods, but this is not the general case. 
  66.  
  67.  DBM TRACE COMPONENT 
  68.  TRACE OUTPUT 
  69.  TRACE QUALIFICATION COMMAND 
  70.  TRACE COOKBOOK 
  71.  
  72.  
  73. ΓòÉΓòÉΓòÉ 3. DBM TRACE COMPONENT ΓòÉΓòÉΓòÉ
  74.  
  75. The DBM Trace Services component consists of the following: 
  76.  
  77.   1. Internal DBM interface to OS/2 trace functions. 
  78.  
  79.   2. DBM's OS/2 Major Trace Codes. 
  80.  
  81.   3. Trace Output. 
  82.  
  83.      a. TRACEFMT program which formats the OS/2 trace records. 
  84.  
  85.      b. SQLTFMT program which formats the DBM trace records from the OS/2 trace 
  86.         records. 
  87.  
  88.   4. SQLTRSET program which limits those DBM components to be traced. 
  89.  
  90.   5. TRACE COOKBOOK, example and usage of the OS/2 and DBM trace. 
  91.  
  92.  Internal DBM Interface To OS/2 Trace Functions 
  93.  DBM OS/2 Major Trace Codes 
  94.  
  95.  
  96. ΓòÉΓòÉΓòÉ 3.1. Internal DBM Interface To OS/2 Trace Functions. ΓòÉΓòÉΓòÉ
  97.  
  98. The DBM components have macros which register calls to the OS/2 Trace Facility 
  99. using the major OS/2 Trace Codes assigned to DBM. These are built into DBM. 
  100.  
  101.  
  102. ΓòÉΓòÉΓòÉ 3.2. DBM OS/2 Major Trace Codes ΓòÉΓòÉΓòÉ
  103.  
  104. The major OS/2 trace codes for DBM are: 
  105.  
  106.  
  107.    176 = Database Function Entry/Exit trace
  108.    177 = User Interface trace
  109.    178 = DB Manager API trace
  110.    179 = Inter-component trace
  111.    180 = Miscellaneous trace
  112.    181 = Miscellaneous trace
  113.    182 = Query Manager Function Entry/Exit trace
  114.    183 = Non-Fatal Error trace
  115.    184 = System Error trace
  116.    185 = Database manager Performance trace
  117.    186 = Query Manager Performance trace
  118.    187 = Database event     (Currently unused)
  119.    188 = Database event     (Currently unused)
  120.    189 = Database event     (Currently unused)
  121.    190 = Database event     (Currently unused)
  122.    191 = Debug trace
  123.  
  124. Trace initialization is done at the STARTDBM command. Programs that can run 
  125. without requiring the STARTDBM command must invoke program SQLTRSET in a 
  126. separate OS/2 Protect Window. 
  127.  
  128.  
  129. ΓòÉΓòÉΓòÉ 4. TRACE OUTPUT ΓòÉΓòÉΓòÉ
  130.  
  131. The DBM trace records, collected in the OS/2 trace buffer, are processed by 
  132. TRACEFMT command to produce a reasonably formatted output. But this output has 
  133. no explanation of the codes that are in hexadecimal. To make this output more 
  134. informative, it is further  processed by the DBM SQLTFMT command to include the 
  135. component and module names and the trace identifier as a decimal number. 
  136.  
  137.  Formatting Using OS/2 TRACEFMT 
  138.  Formatting Using DBM SQLTFMT 
  139.  More on Trace Formatting Commands 
  140.  
  141.  
  142. ΓòÉΓòÉΓòÉ 4.1. Formatting By The OS/2 TRACEFMT Command ΓòÉΓòÉΓòÉ
  143.  
  144. The OS/2 trace buffer must be formatted using the following OS/2 command. 
  145.  
  146.  
  147.         TRACEFMT > filename
  148.  
  149. The output is redirected to the specified file. Without the redirection, the 
  150. formatted trace records will be written to the display screen. The command will 
  151. produce the following formatted output for each trace record in the trace 
  152. buffer: 
  153.  
  154.  
  155.   Unrecognized Trace Event
  156.     Issuing Process ID=pppp  Protect Mode  Dynlink Call  Time Stamp=.....
  157.     Major Event Code=ee  Minor Event Code=cccc
  158.     Data=qq qq ii ii mm tt dd dd dd dd dd dd ....
  159.  
  160.   where all values are in hexadecimal and are defined as
  161.  
  162.     pppp is the process identifier
  163.     ee   is the major trace code B0 to BF corresponding to decimal 176 to 191
  164.     cccc is the component identifier
  165.     qqqq is the companion process identifier
  166.     iiii is the thread identifier
  167.     mm   is the function identifier
  168.     tt   is the trace point identifier
  169.     dd   are the data bytes requested to be dumped by the trace call
  170.  
  171. The OS/2 TRACEFMT command will produce the same formatted output for DBM 
  172. records with the exception that "Unrecognized Trace Event" will be replaced 
  173. with the string "(OS) Data Base - Unrecognized Trace Event". 
  174.  
  175.  
  176. ΓòÉΓòÉΓòÉ 4.2. Formatting By The DBM SQLTFMT Command ΓòÉΓòÉΓòÉ
  177.  
  178. The SQLTFMT command is used to further format the DBM trace records so that the 
  179. trace event type, the component name and the function name will be in 
  180. characters and the trace identifier will be in decimal. 
  181.  
  182. The following is a sample of the trace records produced by SQLTFMT: 
  183.  
  184.  
  185. OS/2 EE Database Manager Trace Formatter
  186.  
  187. (C) Copyright IBM Corporation 1987, 1991
  188.  
  189. --------------------------------------------------------------------------
  190.  
  191. Trace Setup Information
  192.  
  193. Internal Release 200 Modification 00.00
  194.  
  195. Input file  = T1 was created on  - Fri Dec 29 09:06 1989
  196.  
  197. Output file = T2 was created on  - Fri Dec 29 09:27 1989
  198.  
  199. System Trace Records - Tracebuf=63K
  200.  
  201. --------------------------------------------------------------------------
  202.  
  203.  PID  CPID  TID  TRACE EVENT TYPE    COMPONENT           FUNCTION (TRACEID)
  204.  
  205.  0010 0000  0001 176 Function Entry  Forms Specification QRWLDEFLT (1)
  206.  
  207.  0010 0000  0001 177 User Interface  Report Generation   QRWRSSBL (50)
  208.        Data= 42 61 73 65 20
  209.  
  210.  0012 0030  0001 178 DBM API Entry   Relation Data Serv  SQLRLGNR (2)
  211.        Data= 42 61 73 65 20 53
  212.  
  213.  0012 0030  0001 179 Inter-Component Base Sys Utilities  SQLENDOP (51)
  214.        Data= 42 61 73 65 20 53 79
  215.  
  216.  0012 0030  0002 180 Miscellaneous   Buffer Pool Serv    SQLBFLSH (10)
  217.        Data= 42 61 73 65 20 53 79 73
  218.  
  219.  0012 0030  0002 182 Function Exit   Sort/List Services  SQLSZVAL (255)
  220.        Data= 00 00
  221.  
  222.  0012 0030  0001 183 Non-Fatal Error Data Protection     SQLPGWLG (13)
  223.        Data= 42 61 73 65 20 53 79 73 20 55 74
  224.  
  225.  0012 0030  0001 184 System Error    Index Manager       SQLISPLT (69)
  226.        Data= FF 34 00 00 18 22 55 32 00
  227.  
  228.  
  229. ΓòÉΓòÉΓòÉ 4.3. More on Trace Formatting Commands ΓòÉΓòÉΓòÉ
  230.  
  231. SQLTFMT infile outfile options 
  232.  
  233. This program is issued to format the trace records in a file produced by 
  234. running the OS/2 TRACEFMT command such as 
  235.  
  236.  
  237.        TRACEFMT > filename
  238.  
  239. This will cause the OS/2 TRACEFMT command to format the trace records in the 
  240. OS/2 trace buffer and write the formatted trace records to the file specified. 
  241.  
  242. SQLTFMT is then used to further format the output from the TRACEFMT command to 
  243. indicate the trace description, the component description and the function name 
  244. for each trace record. 
  245.  
  246. The optional parameters to this program may be specified anywhere on the 
  247. command line.  The optional parameters are as follows: 
  248.  
  249.  ?         As any parameter causes the help text to be displayed. 
  250.  
  251.            The program will then terminate. 
  252.  
  253.  infile    The name of the file containing the output from the OS/2 TRACEFMT 
  254.            command. 
  255.  
  256.  outfile   The name of the file to contain the formatted trace records. 
  257.  
  258.  -xxx      Indicates which trace records are to be formatted. 
  259.  
  260.  /xxx      The formatting can be limited to the components specified by the 
  261.            component letters described below. 
  262.  
  263.            The default is to format all the trace records. 
  264.  
  265.            There should be no space between the dash (-) or slash (/) and the 
  266.            component letters. 
  267.  
  268.            These options may be specified as -x -x -x or -xxx where the x is 
  269.            any valid component letter or the number 1, 2 or 3.  A slash (/) may 
  270.            be used in place of the dash (-). 
  271.  
  272.  +number   Indicates the number of trace records that are to be skipped at the 
  273.            beginning of the input file. 
  274.  
  275.  =number   Indicates the number of trace records that are to be formatted. The 
  276.            program terminates when this number is reached. 
  277.  
  278.  The user will be prompted to enter the parameters if no parameters are 
  279.  specified on the command line. 
  280.  
  281.  The help text that is displayed if the ? is specified on the command line is 
  282.  as follows: 
  283.  
  284.  
  285.   SQLTFMT  ?
  286.  
  287.   OS / 2  Database  Manager  Trace  Formatter
  288.   Run  the  OS / 2  TRACEFMT  command  and  save  the  output  in  a  file .
  289.   The  output  from  TRACEFMT  is  the  input  to  this  program .
  290.   The  default  is  to  format  all  DBM  trace  records  unless  any
  291.   of  the  following  options  are  specified  on  the  command  line :
  292.  
  293.     - a     Format  APS  records .       - o     Format  OSS  records .
  294.     - b     Format  BPS  records .       - p     Format  DPS  records .
  295.     - c     Format  DDS  records .       - r     Format  RDS  records .
  296.     - d     Format  DMS  records .       - s     Format  SLS  records .
  297.     - e     Format  BSU  records .       - u     Format  DBU  records .
  298.     - f     Format  ICS  records .       - v     Format  DS   records .
  299.     - i     Format  IXM  records .       - z     Format  GBL  records .
  300.     - n     Format  CMP  records .       - l     Format  SSS  records .
  301.     - t     Include  timestamp .
  302.     - 1     Format  Database  Services  trace  records .
  303.     - 2     Format  Query  Manager  trace  records .
  304.     - 3     Write  non - DBM  trace  records  to  output  file .
  305.     + num   Skip  specified  number  of  trace  records  at  beginning .
  306.     = num   Stop  after  formatting  specified  number  of  trace  records .
  307.  
  308.   A  slash  ( / )  may  be  used  in  place  of  the  dash  ( - ) .
  309.   More  than  one  option  may  be  specified  after  the  dash  or  slash
  310.   without  any  spaces  between  the  options .  If  no  arguments  are  specified  they
  311.   are  prompted  for  when  the  command  is  run .
  312.  
  313.  
  314. ΓòÉΓòÉΓòÉ 5. TRACE QUALIFICATION COMMAND ΓòÉΓòÉΓòÉ
  315.  
  316. SQLTRSET traceparms 
  317.  
  318. This program is issued to limit the trace by DBM components. 
  319.  
  320. The input parameter (traceparms) is a character string containing any of the 
  321. following: 
  322.  
  323.   1. The component letters for the components to be traced. 
  324.  
  325.  
  326.                a  = All Application Programming Services
  327.                a.b= COBOL Precompiler
  328.                a.c= C Precompiler
  329.                a.f= FORTRAN Precompiler
  330.                a.g= APS General Services
  331.                a.i= APS Precompiler Services
  332.                a.j= APS Binder Services
  333.                a.k= APS Runtime Services
  334.                a.p= PASCAL Precompiler
  335.                a.r= REXX Precompiler
  336.                b  = Buffer Pool Services
  337.                c  = Distributed Data Services
  338.                d  = Data Management Services
  339.                e  = Base System Utilities
  340.                f  = Configuration/Install
  341.                i  = Index Manager
  342.                l  = DOS Requestor Server Support
  343.                m  = MUG (UPM)
  344.                n  = Compiler
  345.                o  = Operating System Services
  346.                p  = Data Protection Services
  347.                r  = Relational Data Services
  348.                s  = Sort List Services
  349.                u  = Utility Services
  350.                v  = Data Services
  351.                z  = Common Services
  352.  
  353.                C = Command Language Parser
  354.                D = System Layer
  355.                E = Screen Interface
  356.                F = Panels
  357.                G = Generic Print
  358.                H = Helps Supporting Code
  359.                K = Callable Interface
  360.                L = Forms Specification
  361.                M = Menus
  362.                N = Navigation
  363.                O = Table / Index
  364.                P = Procedures
  365.                Q = Prompted Query / View
  366.                R = Report Generation
  367.                S = SQL Interface
  368.                T = Tools
  369.                V = Variable Pool
  370.                W = SQL Query Window
  371.                X = Grant / Revoke
  372.                Z = Common Functions
  373.  
  374.   2. Besides these the following options are supported. 
  375.  
  376.      The maximum number system errors to be traced is set by the e option on 
  377.      the command line. It is specified as /eXX or -eXX where XX is a number. 
  378.  
  379.      To stop tracing  /s or -s can be specified on the command line. To restart 
  380.      /r or -r can be specified on the command line. 
  381.  
  382.      To include thread id and companion process id /p or -p can be used on the 
  383.      command line. To remove these ids form the trace record /n or -n can be 
  384.      specified. 
  385.  
  386.      To allow both entry and exit trace when 176/182 trace is on, /f or -f can 
  387.      be used. To include only entry trace /fe or -fe can be used. To include 
  388.      exit tracing /fx or -fx can be used. 
  389.  
  390.   3. The trace component letters may be separated by blanks or commas. All 
  391.      other input is invalid and is ignored except that a warning message 
  392.      displayed to the user. 
  393.  
  394.  For any invalid options in the traceparms passed to this program, the 
  395.  following message is displayed: 
  396.  
  397.  
  398.       Option  ?  is  ignored .
  399.  
  400.       where  the  ?  is  the  character  that  is  invalid .
  401.  
  402.  This program will also display the following message: 
  403.  
  404.  
  405.       Press  ENTER  to  exit  if  you  have  issued  STARTDBM .
  406.       Otherwise ,  leave  this  program  active .
  407.  
  408.  Since the component identifiers for the components to be traced are stored in 
  409.  the Trace Shared Segment, this program must remain active to prevent OS/2 from 
  410.  de-allocating the shared segment unless there  is some other program active 
  411.  (like STARTDBM) that has also allocated the Trace Shared Segment. 
  412.  
  413.  
  414. ΓòÉΓòÉΓòÉ 6. TRACE COOKBOOK ΓòÉΓòÉΓòÉ
  415.  
  416. Step by step procedures for QM and DBM Problem Determination is provided here 
  417. for general problem determination. 
  418.  
  419. Particular procedures received from the National Support Division should be 
  420. followed. When a problem procedure is given for a particular problem, those 
  421. steps must be followed to insure proper isolation. 
  422.  
  423. This general procedure should be executed on the failing workstations (e.g. 
  424. standalone, or both server and requester when RDS is used). 
  425.  
  426.  Starting Traces Without Using Command Files 
  427.  Starting Traces Using Command Files 
  428.  
  429.  
  430. ΓòÉΓòÉΓòÉ 6.1. Starting Traces Without Using Command Files ΓòÉΓòÉΓòÉ
  431.  
  432. A Procedure for QM and DBM Problem Determination without using command files. 
  433.  
  434.        1. In config.sys add the following to bottom of the file.
  435.           Do this once per workstation and then IPL the workstation.
  436.  
  437.               TRACE=OFF
  438.               TRACEBUF=63
  439.               LOG=ON
  440.  
  441.        2. In a protect OS/2 window do the following:
  442.  
  443.              a. C:>startdbm
  444.  
  445.              b. C:>sqltrset -e0
  446.  
  447.              c. C:>trace on 176 177 178 179 180 181 182 183 184
  448.  
  449.        3. Go to a another OS/2 window and run your testcase or failing scenario:
  450.  
  451.              a. If the system had an abnormal termination, you must remember the screen
  452.                 information print it out so you can give it in the problem report.
  453.  
  454.              b. Do not continue pass the error! Any work beyond the error may cause the
  455.                 error information to be rolled out of the resident trace memory.
  456.  
  457.        4. Go back to the trace window and do:
  458.  
  459.              a. tracefmt.exe > d:\path\filenam1.ext
  460.  
  461.                 YOU CAN DO THE FOLLOWING IF YOU WANT TO, BUT YOU SHOULD SEND THE ABOVE
  462.                 DATA AS A SEPARATE FILE WITH YOUR PROBLEM REPORT. IF YOU DO FORMAT THE TRACE
  463.                 USING SQLTFMT, THEN JUST SEND IN THE FORMATTED SQL TRACE FILE.
  464.  
  465.                 You may not have "SQLTFMT.EXE" in your \SQLLIB database directory, but if
  466.                 you do. Then you may enter.
  467.  
  468.              a. C:>sqltfmt.exe d:\path\filenam1.ext d:\path\filenam2.ext
  469.  
  470.              b. C:>edit d:\path\filename2.ext
  471.  
  472.                 If the system had an abnormal termination, then look for SQLEAPEX entry
  473.                 trace, the function just following (next line below) is the one that failed.
  474.  
  475.                 Else, look for the first occurrence of trace 184 (last one as you go from
  476.                 line 1 to line n).
  477.  
  478.                 If no trace 184 errors, then look for the first trace 183 error.  But, you
  479.                 have to be more careful with trace 183, because you get non-fatal errors
  480.                 like: "end of record (sqlcode 100)" or "database directory not found (no
  481.                 databases on system)" type errors.
  482.  
  483.                 The data area should have the error for example: "902" in hex "FC7A" or
  484.                 "FFFFFFFC7A".
  485.  
  486.                 If no SQLEAPEX, then the abend happen before or after the termination
  487.                 exit routine was installed or de-installed. You can use "WHATTRAP"
  488.                 command file to find the failing dll or exe.
  489.  
  490.                 Save the trace file for problem report.
  491.  
  492.        5. Now get the system error log by:
  493.  
  494.               SYSLOG <enter>
  495.  
  496.           Print it, save it for the problem report.
  497.  
  498.           If you print it with the printer off you may copy \spool\printfile.xxx
  499.           filename.ext to save it in a ascii file and also send that file along
  500.           with your problem report.
  501.  
  502.           SYSLOG information is placed in \OS2\SYSTEM\LOG0001.DAT.
  503.  
  504.           If the workstation was Re-IPL'ed, then use the
  505.           \OS2\SYSTEM\LOG0001.BAK or send both.
  506.  
  507.        6. In the trace protect OS/2 window do the following:
  508.  
  509.              a. C:>trace off 176 177 178 179 180 181 182 183 184
  510.  
  511.              b. C:>stopdbm
  512.  
  513.        7. Repeat the above steps (1-6) using trace points only 183 184.
  514.  
  515.           This should be done, if there was to much activity, that the data
  516.           may have been lost (rolled out of the trace buffer).
  517.  
  518.           Send all files along with your problem report.
  519.  
  520.  
  521. ΓòÉΓòÉΓòÉ 6.2. Starting Traces Using Command Files ΓòÉΓòÉΓòÉ
  522.  
  523. In order not to have to key in or remember all the commands, place them in a 
  524. command file. 
  525.  
  526.   1. In config.sys add to bottom of the file: Do this once per workstation and 
  527.      then IPL the workstation.   TRACE=OFF   TRACEBUF=63   note: you can use 
  528.      any number less than or equal to 63,   LOG=ON        but we recommend 63. 
  529.  
  530.   2. In a protect OS/2 window do the following:   TRACEON <enter> 
  531.  
  532.      a. set system trace option #7 set to 0, maximum system trace for single 
  533.         treaded testcases.  For multiple threads or multiple processes use the 
  534.         default, which will only trace 184's after first 184 system error. 
  535.  
  536.      b. set trace all components or just the suspected ones 
  537.  
  538.      c. select exit the menu, should be back at ready prompt "C:>" 
  539.  
  540.   3. Go to a another OS/2 window and run your testcase or failing scenario: 
  541.  
  542.      If the system had an abnormal termination, you must remember the CS and IP 
  543.      values, and then do the following:   SQLABEND xx CS:IP <enter> 
  544.  
  545.      SQLABEND will give you the component that is failing, although that 
  546.      component may not be the cause of the failure, but it will give you a 
  547.      place to start.  You can open the problem against that component. 
  548.  
  549.   4. Go back to the trace window and do:   TRACEGET <enter> 
  550.  
  551.      a. If the system had an abnormal termination, then look for SQLEAPEX entry 
  552.         trace, the function just following (next line below) is the one that 
  553.         failed. 
  554.  
  555.      b. Else, look for the first occurrence of trace 184 (last one as you go 
  556.         from line 1 to line n). 
  557.  
  558.      c. If no trace 184 errors, then look for the first trace 183 error.  But, 
  559.         you have to be more careful with trace 183, because you get non-fatal 
  560.         errors like: "end of record (sqlcode 100)" or "database directory not 
  561.         found (no databases on system)" type errors. 
  562.  
  563.      d. If still no success, then you may want to use WHATTRAP command file. 
  564.  
  565.   5. Save the trace file for DBM development.  Name it using the PMR Number for 
  566.      example: PMR0x055.FMT, because I already have a hundred or so TRACE.FMTs. 
  567.  
  568.   6. Now get the system error log by:   SYSLOG <enter>   Print it, save for DBM 
  569.      development. 
  570.  
  571.  This procedure can be modified by starting the trace before the error and then 
  572.  do TRACEGET right after the error, so that the trace won't be very large. 
  573.  
  574.  The following are the CMD files used in the above procedure.  Down load this 
  575.  file and move the cmd files into their own files with your editor. 
  576.  
  577.  
  578.   TRACEON.CMD
  579.  
  580.  
  581.   @echo off
  582.   if x%1 == x? goto help
  583.   prompt OS/2 Protect Mode, Trace Facility, $D, $T$_$P>
  584.   @echo on
  585.   startdbm
  586.   trace on 176 177 178 179 180 181 182 183 184
  587.   sqltrset -e0
  588.   goto exit
  589.   :help
  590.   echo
  591.   echo Help - TRACEON.CMD
  592.   echo
  593.   echo
  594.   echo Turns on trace points.
  595.   echo
  596.   echo traceon ?
  597.   echo
  598.   echo     Where, ? provides help information if needed.
  599.   echo
  600.   echo     1.  Run in a protect window.
  601.   echo     2.  No parameter needed, use just command file name "traceon".
  602.   echo     3.  Must have in CONFIG.SYS
  603.   echo         TRACE=OFF
  604.   echo         TRACEBUF=n  where, n is 1 to 63, I suggest 63.
  605.   echo     4.  sqltrset
  606.   echo
  607.   echo                                               Raymond Hernandez 04/28/89
  608.   echo
  609.   :exit
  610.  
  611.  
  612.   TRACEGET.CMD
  613.  
  614.  
  615.   @echo off
  616.   if x%1 == x goto a
  617.   if x%1 == x? goto help
  618.   prompt OS/2 Protect Mode, Trace Facility, $D, $T$_$P>
  619.   tracefmt.exe > %1
  620.   goto b
  621.   :a
  622.   tracefmt.exe > c:\t.trc
  623.   sqltfmt.exe c:\t.trc c:\t.fmt
  624.   e d:\t.fmt
  625.   goto exit
  626.   :b
  627.   if x%2 == x goto c
  628.   sqltfmt.exe %1 %2
  629.   e %2
  630.   goto exit
  631.   :c
  632.   sqltfmt.exe %1 c:\t.fmt
  633.   e t.fmt
  634.   goto exit
  635.   :help
  636.   echo
  637.   echo Help - TRACEGET.CMD
  638.   echo
  639.   echo
  640.   echo   Used to get a formatted trace output.  Use after TRACEON.CMD
  641.   echo
  642.   echo   TRACEGET.CMD  dos_format_file_name  sql_format_file_name
  643.   echo
  644.   echo     dos_format_file_name - is where you want dos to format trace info,
  645.   echo                            default is "c:\t.trc"
  646.   echo
  647.   echo     sql_format_file_name - is where DBM will format trace info,
  648.   echo                            default is "c:\t.fmt"
  649.   echo
  650.   echo   Sequence of Commands:
  651.   echo
  652.   echo   1. tracefmt   dos_format_file_name
  653.   echo   2. sqltfmt    dos_format_file_name  sql_format_file_name
  654.   echo   3. e          sql_format_file_name
  655.   echo
  656.   echo                                               Raymond Hernandez 04/28/89
  657.   echo
  658.   :exit
  659.  
  660.  
  661.   TRACEOFF.CMD
  662.  
  663.  
  664.   @echo off
  665.   if x%1 == x? goto help
  666.   prompt OS/2 Protect Mode, $D, $T$_$P>
  667.   @echo on
  668.   trace off 176 177 178 179 180 181 182 183 184
  669.   @echo off
  670.   goto exit
  671.   :help
  672.   echo
  673.   echo Help - traceoff.cmd
  674.   echo
  675.   echo
  676.   echo   Turn off trace, use after traceon.cmd or traceget.cmd, use when no
  677.   echo   longer needing the trace points to be captured.
  678.   echo
  679.   echo   traceoff ?
  680.   echo
  681.   echo     Where, ? provides help information, if needed.
  682.   echo
  683.   echo     1.  Run in a protect window.
  684.   echo     2.  No parameter needed, use just command file name "traceoff".
  685.   echo
  686.   echo                                               Raymond Hernandez 04/28/89
  687.   echo
  688.   :exit
  689.