Change Current Thread (QteChangeCurrentThread) API


  Required Parameter Group:

1 Thread ID Input Char(8)
2 Error code I/O Char(*)

  Default Public Authority: *USE

  Service Program: QTETHRD

  Threadsafe: No

The Change Current Thread (QteChangeCurrentThread) API changes the current thread to any thread being debugged.

Note: A job may have several threads, each of which are debugged if the job is debugged. By default, the current thread is the initial thread of the debugged job, or the thread at a debug stop.

A current thread has several properties that distinguish it from other threads being debugged:

Before the current thread can be changed the new current thread must be stopped or halted and is waiting for debug to restart it. If this is not true, an error is returned to the API caller and the current thread is not changed.

Threads debugging is supported if a service job is used to debug a job that was spawned by native threads support. If this is not the debug environment present when this API is called, a CPF958B error is returned.


Authorities and Locks

None.


Required Parameter Group

Thread ID
INPUT; CHAR(8)

This is an 8-byte handle assigned by the system.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Error Messages

Message ID Error Message Text
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9541 E Not in debug mode.
CPF9549 E Error addressing API parameter.
CPF9589 E Thread &1 not stopped or halted.
CPF958A E Thread &1 not found.
CPF958B E Threads debugging not supported.


API introduced: V4R2

[ Back to top | Debugger APIs | APIs by category ]