How to export the job log of a particular job?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
skumar
Participant
Posts: 88
Joined: Thu May 25, 2006 5:11 am
Location: Hyderabad

How to export the job log of a particular job?

Post by skumar »

Hi all,

I want to know how to export the information in the log to a file.can anybody help me out in ths..........
Thanks in Advance........


Regards,
skumar.
kalimuddin
Participant
Posts: 28
Joined: Tue Aug 08, 2006 8:07 am

Re: How to export the job log of a particular job?

Post by kalimuddin »

skumar wrote:Hi all,

I want to know how to export the information in the log to a file.can anybody help me out in ths..........
Thanks in Advance........


Regards,
skumar.

try this
dsjob -logdetail ProjectName JobName 'dsjob -logsum ProjectName JobName|head -1|awk '{print $1}'` `dsjob -logsum ProjectName JobName|grep '^[0-9]'|tail -1|awk '{print $1}'` >> FileName.log
skumar
Participant
Posts: 88
Joined: Thu May 25, 2006 5:11 am
Location: Hyderabad

Post by skumar »

Hi Kalimuddin,

Thanks for ur reply.can u please tell me where i have to type that commamnd.....

Thanks,
kumar.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

the dsjob program is called from your UNIX shell. You will need to have your environment set up correctly in order to do this; i.e. issuing the ". ./dsenv " command in your DataStage home directory and either ensuring that $DSHOME/bin is in your path or calling dsjob with an absolute path.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Within Director, choose Print from the Project menu, then check the Print to File check box in the common print dialog and choose whatever options you desire to govern what is exported.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: How to export the job log of a particular job?

Post by chulett »

kalimuddin wrote:try this
dsjob -logdetail ProjectName JobName 'dsjob -logsum ProjectName JobName|head -1|awk '{print $1}'` `dsjob -logsum ProjectName JobName|grep '^[0-9]'|tail -1|awk '{print $1}'` >> FileName.log
You missed a back tick. Sorta. :wink:

Kumar - also search for the equivalent commands in the DataStage online help, they all start with "DSGet" and have "Log" in them. They are the same as those available from 'dsjob' but can be used in a routine or control job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply