Log to file
Moderators: chulett, rschirm, roy
As i was building the functionality only for the adhoc failure requests, what i have designed is to provide the Latest start event id as a parameter(but manually, from the job log)
So, for time being i have this workaround. would work out in detail later and share the updates.
Thanks all for your kind suggestions.
So, for time being i have this workaround. would work out in detail later and share the updates.
Thanks all for your kind suggestions.
Rgds,
MB
MB
i have tried to get the correct start event id..but it's going in an infinite loop.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
hj=DSAttachJob(Jobname,DSJ.ERRFATAL)
START_ID=DSGetNewestLogId(hj,DSJ.LOGRESET)
END_ID=DSGetNewestLogId(hj,DSJ.LOGANY)
Valid=1
a=START_ID-1
LOOP
WHILE valid<>0 DO
Detail=DSGetLogEntry(hj,a)
EventType=Field(Detail,"\",3,1)
if EventType = "DSJ.LOGSTARTED"
then
begin=a
valid=0
End
else
valid=1
a-=1
END
REPEAT
Ans=begin:" " :END_ID
pandeeswaran
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Remove the quotes from around DSJ.LOGSTARTED. This is a predefined integer constant. By making it a string constant you will never succeed in matching the value. Therefore you have an infinite loop.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore
Success!! It works fine now..
@Badra,
The above will give you the start and end id, so that you cna loop through.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
hj=DSAttachJob(Jobname,DSJ.ERRFATAL)
START_ID=DSGetNewestLogId(hj,DSJ.LOGSTARTED)
END_ID=DSGetNewestLogId(hj,DSJ.LOGANY)
valid=1
a=START_ID-1
LOOP
WHILE valid<>0 DO
Detail=DSGetLogEntry(hj,a)
EventType=Field(Detail,"\",4,1)[1,5]
if EventType="Start"
then
begin=a
valid=0
End
else
valid=1
a-=1
END
REPEAT
Ans=begin:" " :END_ID
The above will give you the start and end id, so that you cna loop through.
pandeeswaran