I've used this command in a routine
"SummaryArray = DSGetLogSummary(JHandle, DSJ.LOGWARNING, StartTime, EndTime, MaxNumber)"
It's working fine.The event details are stored in "SummaryArray", i want to pass the contents of "SummaryArray" to a file in Unix.
I've used the command "cat SummaryArray > Log_Warn.txt ".
But it's throwing an error.
How do i pass the contents of "SummaryArray" to a file through routines?
Pls help me out...
Waiting for ur valuable inputs...
How to pass the log event details to a file?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 78
- Joined: Fri Mar 02, 2007 4:54 am
- Location: CHENNAI
You could do it directly with
Code: Select all
OPENSEQ '/path/to/file.txt' TO OutFilePtr THEN WEOFSEQ(OutFilePtr) ELSE NULL
WRITESEQ SummaryArray TO OutFilePtr ELSE CALL DSLogFatal('Bad write','')
CLOSESEQ OutFilePtr
-
- Participant
- Posts: 334
- Joined: Fri Dec 01, 2006 5:17 am
- Location: Texas
Hello!
You can use the 'dsjob' command as well to get your results!
You can use the 'dsjob' command as well to get your results!
![Wink :wink:](./images/smilies/icon_wink.gif)
Code: Select all
dsjob -logsum -type STARTED -max 2 Project_name Job_name 2>/dev/null > Log_Warn.txt
cat Log_Warn.txt
http://findingjobsindatastage.blogspot.com/
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. In this case we have put together theory and practice: nothing works. and nobody knows why! (Albert Einstein)
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. In this case we have put together theory and practice: nothing works. and nobody knows why! (Albert Einstein)