Storing log files

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Storing log files

Post by yaminids »

Hello there,

I have 5 jobs in my project and I want to store all the log files generated while executing the jobs. To be precise, when I execute a job 'A' for example, I want to store the log file generated for this job in a directory. Similarly, I want to store all the log files generated when I execute other jobs in the same directory.
Can anyone suggest me any methods to accomplish this please.

Thanx in advance
-Yamini
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage job logs are not files; they are database tables in the Repository (hashed files).

Search the archive for "archiving log files"; code for achieving this was posted eons ago (probably on the Oliver site, so check this archive too).

If you don't want to write code you could capture the log with an SQL query in the DataStage (TCL) environment, redirecting the output to your specific file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Storing log files

Post by yaminids »

Hi Ray,

Thank you very much for your reply. Can you elaborate about the SQL code in DataStage(TCL) Environment.
I appreciate your time.

-Yamini
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

TCL is like sqlplus for Universe. Universe is the database DataStage uses. If you telnet into your DataStage server then you need to run uv. This command is in the DSEngine/bin directory. You need to be in the project directory before you run uv. Do a search this has been covered a lot. Anyway you can run SQL against DataStage tables like DS_JOB and DS_JOBOBJECTS. There is a JOBNO or job number stored in DS_JOBS for each job. The log files are called RT_LOGxxx where xxx is this job number. Here is how you list this file.

Code: Select all

select
   TIMESTAMP,
   SEVERITY,
   FULL.TEXT
from
   RT_LOG1370
where
   EVAL "@ID" NOT LIKE '//%'
order by 
   TIMESTAMP
;
In this example 1370 is the job number of the job I want to list the log on.

At the UNIX prompt you can use uvsh instead on uv to execute one TCL command at a time. Like this:

Code: Select all

uvsh "select TIMESTAMP, SEVERITY, FULL.TEXT from RT_LOG1370 where EVAL \"@ID\" NOT LIKE '//%' order by TIMESTAMP;" > LogList.txt
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... provided, of course, that the directory for uvsh ($DSHOME/bin) is in your search path (PATH).
Otherwise $DSHOME/bin/uvsh will do it for you, provided you've already executed $DSHOME/dsenv 8)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply