2.1.6 Defining files to be started as child jobs
You can specify a job definition script as a command name in another job definition script. This enables you to run a job definition script specified in the adshexec command as a JP1/Advanced Shell job. This feature is useful in the following cases:
Migrating a user's existing asset shell scripts from a UNIX environment to a Windows environment
Executing an existing shell script that is run in the OS's shell in a UNIX environment as a JP1/Advanced Shell job without rewriting its contents
Of the job definition scripts that are executed as descendant processes, those jobs that are executed by using specific environment setting parameters are called child jobs. A job that is executed from JP1/AJS or a login shell and that is not a child job is called a root job.
If you will be starting job definition script files as child jobs, you must specify in an environment file the conditions for the files to be used. The following provides an overview of the environment setting parameters.
CHILDJOB_EXT parameter
Defines the extension for a job definition script file that is to be executed as a child job.
CHILDJOB_PGM parameter
Defines the path to be replaced so that a job definition script file is executed as a child job.
CHILDJOB_SHEBANG parameter
Defines the path of the executable program of the job definition script file that is to be executed as a child job.
A job definition script file that you create that satisfies the default definition for the CHILDJOB_SHEBANG parameter is run as a child job.
- Important note
If you want to run both root and child jobs by using the same environment file parameters, do not change the ADSH_ENV environment variable values or the contents of the environment files during job execution.