Ian S. Worthington wrote:
Anyone know any easy way to get the BY userid of a logon to a shared userid? Preferably from REXX, given a choice.

Ian Worthington
address command
'PIPE',
   'CP QUERY BYUSER|',
   'SPECS W-1|',
   'VAR BYUSER'

The CP QUERY BYUSER command response conveniently has one of two things as the last word:
1 - the BY USER
or 2 - the userid you enquired about. (i.e. No by-user in effect)

So, after the above you might do something like
   'CP SPOOL CONSOLE TO' byuser

without the need for any special decision making to see if a "by user" is really in effect.

That's just an example, if you really wanted to that, you'd probably put the whole thing in a single pipe...

'PIPE',
   'CP QUERY BYUSER|',
   'SPECS W-1|',
   'VAR BYUSER|',      <== SAVE FOR LATER USE (OPTIONAL)
   'INSERT /SPOOL CONSOLE TO / BEFORE|',
   'CP'

Reply via email to