Script for Cleaning the Log Files

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Thanks alot..Now I am one step behind from cleaning up the PH directory.

I am having a question:

Q) Cna I just go ahead andclear the directory. By clearing fiels of all users, does the jobs gets affected?

Q) Can i deelte boht DS.RUN and DSD.Stage Run
Pradeep Kumar
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can clear out any and all files in &PH& subdirectory; but not any files in the parent project directory, otherwise you will break that project and make it unusable.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I would suggest you only clear it when no jobs are running in the project to avoid any 'issues'. Or do as most people do and every day clear it of anything older than X days, in essence keeping a rolling X days in there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

chulett wrote:Every day clear it of anything older than X days, in essence keeping a rolling X days in there.
Thnaks Craig

So I am thinking to remove all now. Is there anyway to write a script saying to clear the contents anything older than X days of &PH& directory.So that we can run this script
Pradeep Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, that's exactly how it is done. Using a 'find' command with the 'older than X days' option hooked to an 'rm' command is the way to go on a UNIX server. Can't say for Windows unless you have the MKS Toolkit (or equivalent) installed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ralleo
Premium Member
Premium Member
Posts: 21
Joined: Mon Dec 11, 2006 9:05 am
Location: London

&PH&

Post by ralleo »

As Ray said, DSD.RUN is the command DataStage uses to run server jobs.
Historically, the DataStage Engine (Universe) was a screen-oriented shell. Consequently, it will periodically send text to stdout and/or stderr. Examples are run-time error messages (divide by zero illegal in Server Jobs for example).

The DS Jobs are actually run by a program call PHANTOM that runs another programs called DSD.RUN.

You can clear the &PH& area so far as no process is running.

Also check your "scratch area" that can take a lots of space
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Re: &PH&

Post by ArndW »

ralleo wrote:...The DS Jobs are actually run by a program call PHANTOM that runs another programs called DSD.RUN...
I hate to be too picky, but in this case I need to clarify that PHANTOM is a verb which just forks a background process - in this case to execute the DSD.RUN compiled basic program inside the UV shell. This program is what really initiates the running of the DS job.

Deleting the redirected standard outputs file from the &PH& directory for a running job is not a nice thing to do, but won't cause the jobs to abort.
Post Reply