Writing UNIX shell scripts

This topic documents intended Programming Interfaces that allow the customer to write programs to obtain the services of IBM SMP/E for z/OS, V3R6.

To simplify the post-install work for z/OS® UNIX Services application programs, some UNIX applications include shell scripts. These scripts perform additional processing when SMP/E installs elements into a UNIX file system. A product packager normally includes any necessary shell scripts with the product.

For example, if the hierarchical file system element is a TAR or PAX file, you can provide a shell script that performs the necessary steps to restore the file. As with other products, you use SMP/E to copy the element (a TAR or PAX file) to a directory in a UNIX file system. However, you rely on the element's shell script to actually explode the file into its component subdirectories and files.

SMP/E provides IBM® and vendor product packagers with a generic interface for writing UNIX shell scripts. This topic describes the interface and includes suggestions for designing a shell script for SMP/E processing.

You define the shell script to SMP/E through a hierarchical file system MCS statement, as described in Hierarchical file system element MCS. Once defined, the shell script receives control whenever SMP/E installs or deletes the element.