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
Storing log files
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Storing log files
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
Thank you very much for your reply. Can you elaborate about the SQL code in DataStage(TCL) Environment.
I appreciate your time.
-Yamini
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.
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
select
TIMESTAMP,
SEVERITY,
FULL.TEXT
from
RT_LOG1370
where
EVAL "@ID" NOT LIKE '//%'
order by
TIMESTAMP
;
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
... 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
Otherwise $DSHOME/bin/uvsh will do it for you, provided you've already executed $DSHOME/dsenv
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.