Using a Terminal

To debug using an existing terminal, use the following procedures:

  1. Set debug_method to ADM_TERMINAL, then set debug_method_string to the tty string on which you will execute runcbl.
  2. Log on to the UNIX machine that hosts the OLTP software and note the tty device used.
  3. On that machine, execute the runtime with the "--wait" flag. When this option is used, the runtime waits for the OLTP runtime to contact it.

    Note that if you use an additional command-line option, "--restart", the runtime restarts itself after each debugging session. This option is particularly helpful if you have transactions that require multiple COBOL programs and you want to debug all of them. Keep in mind, however, that if you use the "--restart" option, you must use the interrupt sequence (Ctrl+C) to terminate the runtime process when you are finished debugging.

  4. Execute the transaction you intend to debug, ensuring that the tty variable in your transaction debugging screen is set correctly. When the transaction executes, the runtime debugger appears on the terminal, allowing you to set breakpoints, step, evaluate variables, and so on. Once the OLTP runtime terminates the transaction, the terminal returns to a shell prompt.