How to get Job log before compilation ?

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
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

How to get Job log before compilation ?

Post by Nageshsunkoji »

Hi Folks,

I have a requirement to get the Job logs before compilation. For Ex : Some unknown person changed something in my code and he simply saved that job and he didn't comile that Job. In my next run when i compile the same job i am getting the modifications which are not done by me.So, my question is how to get the Job log before compilation with time and user id(optional) when it was last modified. So, anybody have faced this type of problems in your project ? what will be the solution for this ? any routines or scripts are there to get this info ?
Your inputs are most appreciatable.

Regards
Nagesh.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The job log is not removed by compilation. Job log events are purged only if you have automatic purge enabled, and then only on successful completion of a normal run. So you ought to be able to get entries from the log unless the above conditions obtain, in which case they are lost forever.

However, there is a table called DS_AUDIT in the Repository that records all edits (well, most of them anyway) including not just date/time modified but also the user ID who effected the modification. In the Administrator client command window, or at a TCL prompt on the server, query this table.

Code: Select all

SELECT * FROM DS_AUDIT WHERE CLASS = '2' AND INSTANCE = 'jobname';
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

Hi Ray,

Thanks for your reply. You gave me good information regarding DS_AUDIT table. But, as of now i don't have Administrtaor Privileges to perform this query. Can you suggest me how to get the same information as developer point of view. Presently i have access of DS designer and Director. My operating system is a Unix one.

Thanks & Regards
Nagesh.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can execute this query from the TCL environment from UNIX as well. You need to make sure your shell has executed the ".dsenv" script to set up the environment variables, then attach to the project directory and execute "$DSHOME/bin/dssh" to enter TCL; then you can perform the SELECT as Ray has outlined. To exit the TCL environment back into UNIX you need to enter the command "QUIT".
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You do not need Administrator privilege to run this command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

Hi Ray & Arnd,

I executed the query in TCL but i am getting following message :

sac@lpar5m:/dstage/dsadm/Ascential/DataStage/DSEngine:$ . ./dsenv
sac@lpar5m:/dstage/dsadm/Ascential/DataStage/DSEngine:$ bin/dssh
DataStage Command Language 7.5
Copyright (c) 1997 - 2004 Ascential Software Corporation. All Rights Reserved
DSEngine logged on: Wednesday, February 22, 2006 01:32

>SELECT * FROM DS_AUDIT WHERE CLASS='2' AND INSTANCE='Dimension'
Retrieve: syntax error. Unexpected sentence without filename. Token was "".
Scanned command was SELECT * FROM 'DS_AUDIT' WHERE 'CLASS' = '2' AND 'INSTANCE' = 'Dimension'

Please correct me i am doing any wrong things.

Regards
Nagesh.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Append a semicolon (;) to your command. If you don't do this, then the engine will attempt to parse the command as a DataStage "SELECT" command, which has a different syntax.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

>LOGTO <Project_Name>
This should solve your issue.
This allows to logto you project account. DS_AUDIT is an project specific file. Pls note that project names are case sensitive.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

Hi All,

Thanks a ton for your inputs.
Now i am able to see the DS_AUDIT table in the TCL server.

Is it possibel to get this details in the Text file by using Shell script ?

If so suggest me how to write the shell script to get this details ?

Thanks & Regards
Nagesh.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you enter the command "COMO ON {filename}" it will begin echoing all terminal I/O to a UNIX file called "{filename}" in a subdirectory called &COMO& in your project directory. You need to execute the command "COMO OFF" to stop recording data to the file.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Read this post and adapt the advice given there.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

Hi Ray & Arnd,

Great Inputs .

Thanks for your Inputs.

Regards
Nagesh.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
ThilSe
Participant
Posts: 80
Joined: Thu Jun 09, 2005 7:45 am

Post by ThilSe »

Hi,

Is there any help file or Are these table informations documented somewhere?

How can I get more information about these tables and the uses?

Thanks/Regards
Senthil
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Senthil,

the DS_... and RT_... hashed files or tables are not documented by IBM/Ascential. Their contents and use change between versions so IBM/Ascential will never officially document them, since that will remove their flexibility of changing them for ever.
Post Reply