DBG$HELP.HLB  —  DEBUG
of line numbers. You can display all the source lines of a module by specifying a range of line numbers starting from 1 and ending at a number equal to or greater than the largest line number in the module. After displaying a single line of source code, you can display the next line of that module by entering a TYPE command without a line number (that is, by entering TYPE and then pressing the Return key). You can then display the next line and successive lines by repeating this sequence, in effect, reading through your source program one line at a time.

65.2  –  Description

    The TYPE command displays the lines of source code that
    correspond to the specified line numbers. The line numbers used
    by the debugger to identify lines of source code are generated by
    the compiler. They appear in a compiler-generated listing and in
    a screen-mode source display.

    If you specify a module name with the TYPE command, the module
    must be set. Use the SHOW MODULE command to determine whether
    a particular module is set. Then use the SET MODULE command, if
    necessary.

    In screen mode, the output of a TYPE command is directed at the
    current source display, not at an output or DO display. The
    source display shows the lines specified and any surrounding
    lines that fit in the display window.

    Related commands:

       EXAMINE/SOURCE
       SET (BREAK,TRACE,WATCH)/[NO]SOURCE
       SET MODE [NO]SCREEN
       (SET,SHOW,CANCEL) SCOPE
       SET STEP [NO]SOURCE
       STEP/[NO]SOURCE

65.3  –  Examples

    1.DBG> TYPE 160
      module COBOLTEST
         160: START-IT-PARA.
      DBG> TYPE
      module COBOLTEST
         161:         MOVE SC1 TO ES0.
      DBG>

      In this example, the first TYPE command displays line 160,
      using the current scope to locate the module containing
      that line number. The second TYPE command, entered without
      specifying a line number, displays the next line in that
      module.

    2.DBG> TYPE 160:163
      module COBOLTEST
         160: START-IT-PARA.
         161:         MOVE SC1 TO ES0.
         162:         DISPLAY ES0.
         163:         MOVE SC1 TO ES1.
      DBG>

      This command displays lines 160 to 163, using the current scope
      to locate the module.

    3.DBG> TYPE SCREEN_IO\7,22:24

      This command displays line 7 and lines 22 to 24 in module
      SCREEN_IO.

66  –  WAIT

    Causes the debugger to wait until the target processes have
    stopped before prompting for the next command.

    Format

      WAIT

66.1  –  Description

    When debugging multiprocess programs, the WAIT command causes
    the debugger to complete executing all process specified by the
    previous command before displaying a prompt to accept and execute
    another command.

    Related commands:

       STOP
       SET MODE [NO]INTERRUPT
       SET MODE [NO]WAIT

66.2  –  Example

  all> 2,3> GO;WAIT

  processes 2,3
    break at CLIENT\main\%LINE 18814
        18814:      status = sys$qiow (EFN$C_ENF,  mbxchan,
                          IO$_READVBLKIO$M_WRITERCHECK, myiosb)
  process 1
    break at SERVER\main\%LINE 18834
        18834:             if ((myiosb.iosb$w_status ==
                          SS$_NOREADER) && (pos_status != -1))
  all>

      This command sequence executes the target processes (in this
      case, 2 and 3), and the debugger waits until both processes
      reach breakpoints before prompting for the next command.

67  –  WHILE

    Executes a sequence of commands while the language expression
    (Boolean expression) you have specified evaluates as true.

    Format

      WHILE  Boolean-expression DO (command[; . . . ])

67.1  –  Parameters

 Boolean-expression

    Specifies a language expression that evaluates as a Boolean value
    (true or false) in the currently set language.

 command

    Specifies a debugger command. If you specify more than one
    command, separate the commands with semicolons (;).  At each
    execution, the debugger checks the syntax of any expressions in
    the commands and then evaluates them.

67.2  –  Description

    The WHILE command evaluates a Boolean expression in the current
    language. If the value is true, the command list in the DO clause
    is executed. The command then repeats the sequence, reevaluating
    the Boolean expression and executing the command list until the
    expression is evaluated as false.

    If the Boolean expression is false, the WHILE command terminates.

    Related commands:

       EXITLOOP
       FOR
       REPEAT

67.3  –  Example

  DBG> WHILE (X .EQ. 0) DO (STEP/SILENT)

      This command directs the debugger to keep stepping through the
      program until X no longer equals 0 (Fortran example).
Close Help