HP3000-L Archives

May 2001, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Robert Mills <[log in to unmask]>
Reply To:
Robert Mills <[log in to unmask]>
Date:
Tue, 29 May 2001 11:55:30 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (79 lines)
If you can afford to pay somebody to sit looking at your console all day
then all I can say is 'There's this bridge in New York that ....' :)

-----Original Message-----
From: Shahan, Ray [mailto:[log in to unmask]]
Sent: Friday, May 25, 2001 7:26 PM
To: [log in to unmask]
Subject: Re: Passing HPSTREAMEDBY from one job to another.


On a humorous note:  One could simply do a TELLOP from the first job to let
the operator know to watch the damn console, and when the last job in this
series completes, call !HPSTREAMEDBY, and let them know.   :-)

Ray Shahan

> -----Original Message-----
> From: Paul Taffel [SMTP:[log in to unmask]]
> Sent: Friday, May 25, 2001 11:12 AM
> To:   [log in to unmask]
> Subject:      Re: Passing HPSTREAMEDBY from one job to another.
>
> There's another solution that doesn't require the use of permanent files
> at all.  It's a bit complex, and also won't work with scheduled jobs:
>
> The SHOWVAR command was recently enhanced with a "JOB="
> parameter.  This allows a job to recover CI variables set within another
> job.  Unfortunately it can't be used to directly recover the value of
> HPSTREAMEDBY in another job, as the ";JOB=" keyword won't
> allow one to recover "predefined" variables from another job.  It also
> requires that the 'other' job is still logged on.
>
> So, execute the following inside a system-wide logon UDC:
>
>    :SETVAR PARENTSTREAMEDBY '#!HPJOBTYPE!HPJOBNUM'
>    :SETVAR PARENTID RTRIM(XWORD(HPSTREAMEDBY,'('),')')
>    :IF STR(PARENTID,1,1)='#'
>    :  SHOWVAR PARENTSTREAMEDBY;JOB=!PARENTID >temp
>    :  INPUT PARENTINFO <temp
>    :  SETVAR PARENTSTREAMEDBY LTRIM(XWORD(PARENTINFO,'='))
>    :ENDIF
>
> This does the following:
> - initialize PARENTSTREAMEDBY to the current job ID
> - extract the job ID of our 'parent' job or session.
> - recover PARENTSTREAMEDBY from this job or session
> - initializes a local CI variable with this value.
>
> After this has been executed, PARENTSTREAMEDBY should contain
> the job ID of the session that originally streamed the first job.
>
> There's a couple of important 'gotchas' with this solution:
> - if a job logs off immediately after streaming another, before the new
> job
>    has had a chance to execute the above code, it will fail.  This means
> that
>    this technique probably can't be used with scheduled jobs.  It may
>    be necessary to add a :PAUSE before :EOJ in your jobs, or after
>    STREAM.  You can easily do this using a system-wide UDC for
>    STREAM or EOJ (I prefer EOJ).
> - the code probably needs to execute with HPAUTOCONT true,
>    because HPSTREAMEDBY may not always contain a valid Job ID (for
>    jobs streamed from within SYSSTART, for example).
> - I have not tested this code extensively!  You may need to add more
>    error handling before putting this into production.
>
> Hope this helps,
>
> Paul Taffel
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2