Page 1 of 1

Posted: Mon Nov 27, 2006 4:18 am
by rameshrr3
In DataStage command language

execute the following command from administrator after ensuring all users have been disconnected

Code: Select all

CLEAR.FILE &PH&
In Unix, go to the project directory
change to the &PH& subdirectory, and delete files
Once again ensure all users have been disconnected
from data stage

Code: Select all

#cd \&PH\&
#rm *.*

Posted: Mon Nov 27, 2006 2:19 pm
by ray.wurlod
Background processes are called "phantom" processes in DataStage, for reasons historical. These processes direct their output to files in &PH& which is a subdirectory in the project directory.

Do not use the sledgehammer approach proposed by rameshrr3. Instead use a gentler approach which removes only older records. That way, if there are running jobs, you will not trample on the files to which they are trying to redirect their output.

Code: Select all

find '&PH&' -atime +7 -exec rm {} \;
Beware that "&" and ";" are special characters in the shell, so need to be hard-quoted or escaped in the find command.

The number of files limit limits the number of files a process can have open simultaneously. By setting this to a larger value in dsenv is means that a given DataStage process will be less likely to fail to open a file because it has no more file units available.

:idea: To execute a UNIX command from the Administrator client use the SH command.

Code: Select all

SH -c "find '&PH&' -atime +7 -exec rm {} \;"