How should we manage cleaning up the &PH& directories for my DataStage projects? Can the process be automated?
Files in the &PH& directories under DataStage project directories store runtime information when jobs are run and need to be cleared out periodically.
- Ensure there are no DataStage jobs running anywhere on the system by running "ps -ef | grep DSD"
- From the DataStage Administrator, go to the Projects page, select the project whose file you want to clear and click the Command button. The Command Interface dialog box opens.
- Type the following into the command field: CLEAR.FILE &PH& (all uppercase)
- Click Execute to run the command and clear the file.
You can also remove the contents of the &PH& directory using the rm command. You can create a shell script to manually delete the files. To ensure there are no locks only delete files that are from finished jobs by ensuring the files are older then the longest running job. Generally you can delete files older then a week.
** Important **
Please only delete the contents of &PH& directory and not the &PH& directory itself.
You will find a directory for the &PH& in each project that you have created on that server.
You must not remove any contents or directories for the following:
These directories/files are related to the jobs within your projects that you are running on the server and if you manually remove or edit any of these files you are likely to corrupt the jobs and possibly the projects. These directories exist for each job that has been created within your project. You could ask your developers to review if there are any jobs that are no longer used and can be removed using the DataStage clients.