storing of log details of a job in a file on windows and uni

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

Post Reply
rkdatastage
Participant
Posts: 107
Joined: Wed Sep 29, 2004 10:15 am

storing of log details of a job in a file on windows and uni

Post by rkdatastage »

hi
i would like to store the log generated into a file automatically by using datastage routines or unix shell script when a job has been run. please send me as much data as you can . i would be very much thankful to you
. please specify me the process that i have to follow to store the log details generated into a file when a job is executed.
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

If you get the job number of your job (nnn) from the DS_JOBS table, then the log for that job is a table called RT_LOGnnn.

You can either pipe the results from the OS using the command line interface dsjob with its "-log" options.

OR

You can create a job that uses a Universe stage with a regular query, for example:

Code: Select all

SELECT * FROM RT_LOGnnn; 
Cheers,
Dave Nemirovsky
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

The .pdf files distributed with the software, available under your Start button as Online Documentation, cover in the BASIC manual all of the APIs available for accessing the log information. You can search the forum, as we've posted many times logic that can be used to extract info from logs.

You can write an after-job routine that dumps the contents contributed to the log file into a file or table. Or, you can write your own job control that does that after each job it runs. Alternatively, you can use the dsjob command line program to access the same APIs but without having to write any DS BASIC routines or logic. All of your logic will be in the script or program that uses dsjob.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply