Page 1 of 1

unable to run clear.file command fron a datastage job

Posted: Wed Aug 14, 2013 2:12 pm
by VineelPrem
Hi
I am having trouble running a script whioch has command clear.file RT_LOG from Execute stage .
The output i get in the log is

: line 33: clear.file: command not found
128

Posted: Wed Aug 14, 2013 3:34 pm
by chulett
It's not an operating system command. It needs to be run from a TCL prompt which is why you would typically use the Adminstrator client. From the command line, you'd have to leverage dssh to run it.

Posted: Wed Aug 14, 2013 4:35 pm
by ray.wurlod
There is no table called RT_LOG. Each job has its own log, in a table named according to the convention RT_LOGnnn, where nnn is the unique job number allotted to the job and recorded in DS_JOBS table.

Posted: Wed Aug 14, 2013 4:40 pm
by chulett
That too. :wink:

How about letting us know what you are trying to accomplish?

Posted: Mon Aug 26, 2013 1:22 pm
by VineelPrem
Hi Chulett . I am just trying to automate a process which cleans the job logs periodically . Was trying to do it from a script

Posted: Mon Aug 26, 2013 4:44 pm
by ray.wurlod
Then the script needs to have sourced the $DSHOME/dsenv script and then needs to invoke the $DSHOME/bin/dssh command to effect the CLEAR.FILE command within a DataStage shell. You also need to know the job number so that you can identify the correct RT_LOGnnn number.

Posted: Tue Aug 27, 2013 8:43 am
by VineelPrem
Thanks ray for the reply