Page 1 of 1

Posted: Thu Oct 26, 2006 6:12 am
by Kirtikumar
Format is is visible from the log info itself.

From the info shown in the log file, just use any name whatever you want and get the columns which you want.
E.g. first one seems to be a event number, then the timestamp and then the eventy type and then last one is the message.
Use the delimiter as '\' and then read the cols with whatever colname u want and then using copy stage you can drop the column which you do not want.

Posted: Thu Oct 26, 2006 7:09 am
by rajan.n
hi kirti kumar,
thanks for ur responce
i already tried that .that did not worked.
any how i was trying using with : as delimiter..,it is dividing the the line in to 5 diff coloumns where it finds ":", my result is to extract the last field. any how this is not the correct process but ,am doing it now. thanks a lot ,
but i need to learn y it has not allowed me with /.



Kirtikumar wrote:Format is is visible from the log info itself.

From the info shown in the log file, just use any name whatever you want and get the columns which you want.
E.g. first one seems to be a event number, then the timestamp and then the eventy type and then last one is the message.
Use the delimiter as '\' and then read the cols with whatever colname u want and then using copy stage you can drop the column which you do not want.

Posted: Thu Oct 26, 2006 9:21 am
by ray.wurlod
Your basic premise, that the job log is a text file, is incorrect. It is a database table within the DataStage Repository. The dsjob command executes an appropriate query to retrieve the information, then reformats it. If you want that information into a text file, redirect stdout of your dsjob command. After that, you can use any utility you like (Excel?) to parse the delimited data.

Posted: Thu Oct 26, 2006 11:02 pm
by Kirtikumar
Actually I was referring to the file created by the OP. I assumed he has used DSLogGetSummary and then stored in the info in the seq file. That is the reason I mentioned it as sequential file.

Rajan, have you written or using a routine to read the log files and then building the normal file from it?

If this is the case, then the mentioned approach should work for you. If it is not allowing you to use it as delimiter, then read the whole line as a single column. Then using string functions like field, substring you can extract the required info from it.
HTH.

Posted: Fri Oct 27, 2006 12:15 am
by chulett
Kirtikumar wrote:Rajan, have you written or using a routine to read the log files and then building the normal file from it?
I guess you haven't been following this little... 'exercise', eh? :wink:

Posted: Fri Oct 27, 2006 1:47 am
by rajan.n
hi,
thnks for the reply,
i have writen routine . which creates a .txt file. teh fileincludes the warning msg of a job.
so now i want to extract only db warnings from that file.
what my logic is ..if any warning has sql state i need to extract them.







Kirtikumar wrote:Actually I was referring to the file created by the OP. I assumed he has used DSLogGetSummary and then stored in the info in the seq file. That is the reason I mentioned it as sequential file.

Rajan, have you written or using a routine to read the log files and then building the normal file from it?

If this is the case, then the mentioned approach should work for you. If it is not allowing you to use it as delimiter, then read the whole line as a single column. Then using string functions like field, substring you can extract the required info from it.
HTH.

Posted: Fri Oct 27, 2006 4:18 am
by Kirtikumar
I already had once created such routine for one my X assignments Craig!!!

Rajan, simple string find operations are required for this. Post the result if it worked or not.

Posted: Fri Oct 27, 2006 5:18 am
by rameshrr3
We had a similar 'requirement' to create a log-file.
Convinced the client it wasnt possible as data stage is an application :D . All we dd was to write warning and error messages to a log file.

Posted: Fri Oct 27, 2006 8:02 am
by chulett
Kirtikumar wrote:I already had once created such routine for one my X assignments Craig!!!
Me too!!! :wink:

Not what I meant. If you click on the OP's handle and then do a 'Find all posts by', you'll see that the last umpty posts they have made have all been about a Quest For Log Files. It's been... interesting.