> Use your parser to get the job number of the streaming job,
> use jinfo to see who streamed it. Keep going back until you
> get to the streaming session identifier.
I like this approach too. It does require that all intermediate jobs and
the originating session are alive. Here is a script that accomplishes
the task of chasing jobs via their 'streamedby' job number until the
initial session is found. Of course it can be improved upon in a number of
ways, but it provides the basic function.
FWIW,
Jeff (behind on email) Vance, CSY
======================
PARM job,rtnvar=origsess
# This script accepts a job number and, using the id of who streamed it,
# returns in the "rtnvar" variable the originating session id.
#
setvar !rtnvar ""
setvar _by word(jinfo('!job','streamedby'),'()',-2)
while jinfo(_by,'exists') and lft(_by,2) = '#J' do
setvar _by word(jinfo(_by,'streamedby'),'()',-2)
endwhile
if lft(_by,2) = '#S' then
setvar !rtnvar _by
endif
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|