How to look up the queue of a task

Discussion created by Michael_Lowry on Feb 28, 2015
Latest reply on Mar 12, 2018 by Michael_Lowry
I would like to modify EVENT.UNIXCMD, EVENT.UNIXFS, etc. in client 0 so that they run in the queue of the calling task. I thought this would be simple to accomplish using a few commands (including a :PUT_ATT) in the pre-process tabs of these jobs in client 0. However, I have run into an obstacle. I can find no straightforward way to look up the queue of the calling task. GET_STATISTIC_DETAIL would be the most obvious candidate, but this command appears not to be able to retrieve the queue, despite the fact that this piece of information is definitely there to be read.

I can think of two ways around this:
  1. Print&$QUEUE#to the activation protocol of the calling job, and usePREP_PROCESS_REPORTin the EVENT.*** job to read it.
  2. Use an SQL query (maybe via an SEC_SQLI VARA with the runID of the parent passed as a bind parameter) to look up the queue of the parent (calling) task.
I assume there must be a better, more straightforward way to do this. Can any one help? Thanks in advance.