Hi All,
I need to retrieve the
" Fatal error messages from datastage job log for latest run " and store in the file.
If anyone has done it ,Please share . I am trying to use the
Dsjob -logsum command.
Thanks in Advance.
Retrieve Fatal Error from DataStage Job
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 20
- Joined: Tue Jun 22, 2010 9:02 am
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
Below is the basic routine, it may help you.
Below is the basic routine, it may help you.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
JobName = FIELD(Arg1,"|",1)
****JobName = DSJ.ME
hJob1 = DSAttachJob(JobName, DSJ.ERRNONE)
jobStart = DSGetJobInfo (hJob1, DSJ.JOBSTARTTIMESTAMP)
latestID = DSGetNewestLogId(hJob1,DSJ.LOGANY)
DIM evtVector(latestID)
DIM errVector(latestID)
DIM errTypeVector(latestID)
Call DSLogInfo("Job Control List: " : hJob1)
Call DSLogInfo("This Job name:" : hJob1)
For eventID = latestID To 1 Step -1
eventDetail = DSGetLogEntry(hJob1,eventID)
Ans = eventDetail
Next eventID
eventDetail = DSGetLogEntry(hJob1,eventID)
evtDate = FIELD(eventDetail,"\",1)
evtDate = CHANGE(evtDate,"Date: ","")
evtMessage = FIELD(eventDetail,"\",4)
evtType = Field(eventDetail,"\",3)
If evtDate < jobStart Then Exit
If evtType = "2" Then
errFlag = @True
errVector(eventID) = evtMessage
errTypeVector(eventID) = "Warning"
End
If evtType = "3" Then
errFlag = @True
errVector(eventID) = evtMessage
errTypeVector(eventID) = "Fatal"
End
If (errFlag) Then
ErrorFile = JobStatsDir:JobName:"_Job_Errors.txt_":BatchSeq
OPENSEQ ErrorFile TO updFile
Ans = evtType
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
link does not work
Clicking on link takes me to the page, but NOT LOGGED IN to my premium account. I cannot see the entire message.
Clicking on "log in" at that point takes me to the "front page" of the site, and NOT THE ARTICLE.
This is compounded by the fact that searching on the site does not seem to work AT ALL.
Oh well,
john3
Clicking on "log in" at that point takes me to the "front page" of the site, and NOT THE ARTICLE.
This is compounded by the fact that searching on the site does not seem to work AT ALL.
Oh well,
john3
john3
----------------------------------------------------
InfoSphere 8.5.0.2; DataStage 8.5.0.0; OS-RHEL 6.6; DB-Oracle Enterprise Edition 11g (11.2.0.4)
----------------------------------------------------
InfoSphere 8.5.0.2; DataStage 8.5.0.0; OS-RHEL 6.6; DB-Oracle Enterprise Edition 11g (11.2.0.4)
Re: link does not work
Correcting myself!
Search works fine, if you just put in your terms and hit <enter> on the keyboard! If, however, you click the "apparent" search button, you get nothing every time. I suppose the button relates to ONLY the exact search? It looked misleading to me.
Sorry guys,
john3
Search works fine, if you just put in your terms and hit <enter> on the keyboard! If, however, you click the "apparent" search button, you get nothing every time. I suppose the button relates to ONLY the exact search? It looked misleading to me.
Sorry guys,
john3
john3
----------------------------------------------------
InfoSphere 8.5.0.2; DataStage 8.5.0.0; OS-RHEL 6.6; DB-Oracle Enterprise Edition 11g (11.2.0.4)
----------------------------------------------------
InfoSphere 8.5.0.2; DataStage 8.5.0.0; OS-RHEL 6.6; DB-Oracle Enterprise Edition 11g (11.2.0.4)
Try the link again, I have 'corrected' it I do believe. The search button runs whatever type of search you have selected via the radio button and the exact search is the only one that searches the entire database. The others only go back in time a certain number of days and thus are not really all that helpful, IMHO, so I only use exact.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers