Topology
Normally the application to be automated depends on the underlying infrastructure, like JES2 or TCPIP. This means that this infrastructure must be available before you can start the application.
Vice versa the application can be a prerequisite for other applications, before they can be started.
Likewise you need to think about which other applications must be terminated prior to the termination of the application.
As described above, there are relationships between the applications.
At this point it might be helpful to draw a picture and to visualize the relationships between the application in case of a start and a stop situation.
SA z/OS provides Best Practice policies containing solutions for several products. The solutions are illustrated in PDF file format located in Add-on policies.
Please refer to the appropriate file to find out more information about the solution you are trying to automate.