Two reliable means are:
If you submit
them as batch jobs you can use the synchronize
command to wait on each in turn.
Using run/detach
to start the processes allows you to specify a /mailbox
to receive the termination message.
Subprocesses are a little different. One approach is to share a logical name table and have each subprocess update its status accordingly. There is no guarantee that an abnormal termination will be reported.
If you are willing to do some extra work you can create a couple of small applications to use either the lock manager or a common event flag cluster to communicate status updates.