Fetching job warnings in a file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
arati
Participant
Posts: 8
Joined: Mon Aug 29, 2005 4:05 am

Fetching job warnings in a file

Post by arati »

Hello All,
My requirement is that all warnings related to the job should be written to the file in the unix.I used DS routine as follows

$INCLUDE DSINCLUDE JOBCONTROL.H

Job = JobName

JobHandle = DSAttachJob(Job,DSJ.ERRWARN)

StartTime = DSGetJobInfo (JobHandle, DSJ.JOBSTARTTIMESTAMP)

EndTime = DSGetJobInfo (JobHandle, DSJ.JOBLASTTIMESTAMP)

RejLog = DSGetLogSummary(JobHandle, DSJ.LOGWARNING,StartTime,EndTime, 20)

TotalLen = Len(RejLog)

StartPnt = Index(RejLog, JobName, 1)

EndPnt = TotalLen - StartPnt

ReqRejLog = Substrings(RejLog,StartPnt,EndPnt)

Ans = ReqRejLog

But all the log information is not returned by this routine.Please give me solution.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Verifying that DSattachJob was successfull might help get the data.
So is verifying returned value form other routines you used.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply