How to read a seq file created by a DSGetLogSummary ??
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
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.
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.
Regards,
S. Kirtikumar.
S. Kirtikumar.
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 /.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
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.
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.
Regards,
S. Kirtikumar.
S. Kirtikumar.
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.
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.
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
Me too!!!Kirtikumar wrote:I already had once created such routine for one my X assignments Craig!!!
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.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers