### CCDFORK

Creates a script for executing CCDPACK commands in a background process

#### Description:

This procedure performs any additional work that is required to safely execute a set of CCDPACK commands in a background job.

The input to it is a file that contains just the CCDPACK commands that you want to execute. This procedure then writes another script that re-initializes CCDPACK and isolates any existing program parameters from your interactive processes.

The output script should be executed as a nice priority background job (see the examples section).

#### Usage:

ccdfork user_script [output_script] [directory]

#### Parameters:

##### $1 = filename (read) The name of the script file which contains the CCDPACK commands which are to be run in the background. #####$2 = filename (write)
The name of the output script which will re-establish the current ADAM context and execute your command file. [ccdpack_fork]
##### \$3 = directory (write)
The name of a directory in which to store the current ADAM context. If no value is given then a sub-directory of the current ADAM_USER parent is created.

#### Examples:

ccdfork ccdred
nice ccdpack_fork &
In this example CCDFORK saves the current ADAM parameter files and writes a script file named ccdpack_fork which will enable the ccdred script file to execute in the background. The output script ccdpack_fork is then nice’d into the background.
ccdfork ccdred batch1
nice batch1 &
As above except that the output script is now called batch1.
ccdfork ccdred batch2 /scratch/user/batch2
As above except the output script is now called batch2 and the ADAM parameter files are written to the directory /scratch/user/batch2.