Binyamin, Chris: Thank you both for your responses. > If you check all the PSA's you should be able to determine if > the task is dispatched. I was also considering the PSA approach by comparing each PSATOLD with the address of the TCB in question. If there's match, then its active. If there's no match and the TCB is not waiting or paused can I assume that it's dispatchable? > If you keep a table of TCBs and you keep both the TCB address and the > TTOKEN value as uniquifiers and you sample both the primary non-dispatch > bit and TCBTTIME you can tell whether or not it was dispatchable when > you looked and whether it is accumulating any cpu time. If you sample > frequently enough then over time, a reasonably valid picture will > emerge. The definition of "frequently enough" is a difficult subject on > its own.
The TCBTTIME approach won't work for me since I need to know the status at the time the sample is taken. > If you use TCBTCB as the "next" pointer, ASXBFTCB will get you ALL of > the TCBs in the address space, regardless of dispatchability. I think I misunderstood the ASXBFTCB function. I thought it had a list of dispatchable TCBs only. Regards, Vic ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html