In article <[log in to unmask]>,
Martin O'Murphy <[log in to unmask]> wrote:
>Doug Werth <[log in to unmask]> wrote:
>>A customer of ours has installed Express-3. He wants to communicate the
>>steps of certain batch jobs back to the user who streamed it via :tell
>>commands. Sounds like a job for the new HPSTREAMEDBY variable. Just do a
>>":tell !hpstreamdby Step 1 of n starting", right. Then I see that the
>>HPSTREAMEDBY variable looks like this:
>>
>>:showvar HPSTREAMEDBY
>>HPSTREAMEDBY = DOUG.WERTH (#S2520)
>>
>>I only want to send it to session 2520, not everyone logged on as
>>DOUG.WERTH. So, time for a little MPE programming. I thought I would share
>>it with the list so nobody would need to re-invent the wheel. Just add
>>these line to the beginning of any batch job, or set them up as a
>>udc/command file, or...
>>
>><-------------- cut here ---------------------------->
>>setvar beginpos pos("(","!hpstreamedby") + 1
>>setvar endpos pos(")","!hpstreamedby")
>>setvar numchars endpos - beginpos
>>setvar streamer str("!hpstreamedby",beginpos,numchars)
>>deletevar beginpos, endpos, numchars
>>showvar @stream@
>><--------------- end cut ----------------------------->
>>
>>HPSTREAMEDBY = DOUG.WERTH (#S2520)
>>STREAMER = #S2520
>>
>>
>Or even....
>
>setvar
streamer,str(hpstreamedby,pos("(",hpstreamedby)+1,pos(")",hpstreamedby)-pos("("
,
hpstreamedby)-1)
>
>Martin.
How about....
setvar streamer hpstreamedby-lft(hpstreamedby,pos("(",hpstreamedby))-")"
-------------------------------------------------------------------
Michael P. Smith [log in to unmask]
HP Systems Programmer [log in to unmask]
Hertz Corporation, Oklahoma City, OK
-------------------------------------------------------------------
'Be a team player, it diffuses the blame' - Dilbert
-------------------------------------------------------------------
The views and opinions expressed in this document are expressly
my own. So get off the couch, I obviously need more help than you.
|