IBM Support

What is the &PH& directory used for in DataStage and does it need to be cleaned out?

Question & Answer


Question

What is the &PH& directory used for and does it need to be cleaned out?

Answer

In each project there is an &PH& directory. This is used to write entries by the phantom process and they have this form:

DSD.RUN_InternalDate_InternalTime
DSD.STAGERUN_ InternalDate_InternalTime

This directory can become large and affect the performance. There is no exact number that could cause a problem due to variances in computing power. Generally this should be cleaned as regular maintenance. The more jobs running the quicker it will grow. You can check how many exist with the command: ls |wc -l
There are a couple ways to fix this problem:
 
* Run CLEAR.FILE command in DataStage Administrator
Log in to DataStage Administrator client, go to Projects tab and select a project, click Command button and type:
CLEAR.FILE &PH&

 
* Run CLEAR.FILE command in uvsh
SSH or telnet login to Engine tier machine as DataStage Administrator user like dsadm, and run following commands in $DSHOME directory:

1. Source the dsenv file:
. ./dsenv
2. Type:
bin/uvsh
3. Type:
LOGTO <ProjectName>
4. Type:
CLEAR.FILE &PH&
 
* Delete files using OS 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. You need to make sure the files are older than the longest running job. Generally you can just delete files older than a week.
For example, to clean up phantom output files for dstage1 project older than 7 days, you can run following command everyday in cron
find /opt/IBM/InformationServer/Server/Projects/dstage1/'&PH&' -mtime +7 -type f ! -name .uvnlsmap -delete
in Linux,
find /opt/IBM/InformationServer/Server/Projects/dstage1/'&PH&' -mtime +7 -type f ! -name .uvnlsmap -exec rm -f {} \;
in Unix.
Note:
- CLEAR.FILE &PH& command SHOULD ONLY be run when you have no jobs running or users logged in to DataStage clients.

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSVSEF","label":"IBM InfoSphere DataStage"},"ARM Category":[{"code":"a8m50000000L0t8AAC","label":"DataStage"},{"code":"a8m50000000L0t8AAC","label":"DataStage"},{"code":"a8m50000000L0t8AAC","label":"DataStage"},{"code":"a8m50000000L0t8AAC","label":"DataStage"},{"code":"a8m50000000L0t8AAC","label":"DataStage"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Versions"}]

Document Information

Modified date:
16 March 2023

UID

swg21414210