We have moved to www.dataGenX.net, Keep Learning with us.

Tuesday, September 03, 2013

Commands to delete files in &PH& directories in IBM InfoSphere DataStage



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.

 

Steps :

To clear the &PH& directory from within DataStage:
  1. Ensure there are no DataStage jobs running anywhere on the system by running "ps -ef | grep DSD"
  2. 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.
  3. Type the following into the command field: CLEAR.FILE &PH& (all uppercase)
  4. 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:
DS_TEMP*
RT_BP*.O
RT_BP*
RT_LOG*
RT_STATUS*
RT_CONFIG*

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.