z/OS MVS Programming: Extended Addressability Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Obtaining the TCB identifier for a task (ttoken)

z/OS MVS Programming: Extended Addressability Guide
SA23-1394-00

Each task in the system is identified in two ways:
  • By the TCB address.
  • By the TTOKEN of the task. A TTOKEN is an identifier that the system assigns to a TCB. Unlike a TCB address, a TTOKEN is unique within the IPL; the system does not assign the same identifier to any other TCB until the next IPL.
Some MVS™ macros require that you identify the task using the TCB address, some require the TTOKEN, and some allow you to use either the TCB address or the TTOKEN. If you know a task's TCB address and need the TTOKEN value or if you need the TTOKEN for the current task, the task that attached the current task, or the job step task, you can use the TCBTOKEN macro to obtain the value. You can also use the TCBTOKEN macro if you know the TTOKEN for a task and want the TCB address. Use the TYPE parameter on the TCBTOKEN macro to specify the value you are looking for:
TOTTOKEN
The system returns the TTOKEN of the task whose TCB address you specify.
CURRENT
The system returns the TTOKEN of the currently active task.
PARENT
The system returns the TTOKEN of the task that attached the currently active task.
JOBSTEP
The system returns the TTOKEN of the job step task for the primary address space.
TOTCB
The system returns the TCB address for the task whose TTOKEN you specify.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014