>Whether invoked via TSO, ISHELL, TELNET, a pid is a pid is a pid.

I don't think it's that simple. 

a) Batch: Start a program via batch job (EXEC PGM=ABC). For WLM
   its a batch transaction even if the program invokes some z/OS 
   UNIX services and thus gets dubbed a process (gets a pid). For
   WLM nothing changes.

b) STC: Start the same program as STC and it will be seem as STC
   by WLM, with or without pid.

Now suppose above program ABC spwan()s a child process running PGM=DEF.

c) If BPX_SHAREAS equals YES (and nothing else prevents the processes
   from sharing the address space), the new process will not be
   a new WLM transaction and still will be seen as BATCH or STC by
   WLM. (I know it an SRM transaction, but let's keep it simple.=

d) If the processes cannot share the AS (for whatever reason), the 
   new child process will run in a "UNIX initiator AS" (BPXAS) and 
   *will be* a new WLM transaction classified after the SUBSYS=OMVS
   rules

Now suppose the above program DEF in the child process spawn()s yet
another (child) progess running program XYZ.

e) If BPX_SHAREAS equals YES (and nothing else....) *and* case c) is
   applicable, then XYZ will still be part of the same BATCH/STC 
   transaction initiated in a) or b), resp.

f) If BPX_SHAREAS equals YES (and nothing else....) *and* case d) is
   applicable, then XYZ will be running in the same AS as DEF and will
   therefore be running under the same WLM transaction (SUBSYS=OMVS).

g) If the new process cannot share the AS with process "DEF", then d)
   applies.

When a new process is started via fork(), it will by definition run in
a separate (BPXAS) address space and will therefore always get
classified
via SUBSYS=OMVS rules as a new WLM transaction.

It gets more complicated if "enclaves" enter the game.

In UNIX speak shell "commands" are sometimes divided into two groups:
- "commands" are those that are built-in into the shell, i.e. no
external
  program file is run.
- "utilities" are those that reside in a separate program file (not
built-in).

IMHO, in (non-TSO OMVS) shell environments, every "utility" will be a
separate WLM transaction only *if* it cannot share the AS with is parent

shell. "commands" are never a separate transaction by the above
definition
of the term "command".

I'm not positive how this works in TSO-OMVS-shells when the shell shares
the
AS with TSO. I think it depends on what the OMVS TSO command processor
does 
when the user hits enter to send some data to the shell. It also depends
on
whether the "utilites" also share the AS with TSO and the shell. If not
there might be a TSO transaction from OMVS passing on the command to the
shell
and another one for the utility.

I'm sure I messed up one cas or the other and missed one or two cases
:-)
As initially said, I don't think it's that simple.

Peter Hunkeler
CREDIT SUISSE

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to