Job Related Information
Moderators: chulett, rschirm, roy
Job Related Information
Hey Gurus ,
I m trying to put some basic information about the datastage jobs in a table or file (like job name , status , job start , job end). I developed a routine which uses the job handle value in the DSgetjobinfo routine and brings this information. I call this routine from a server job which passes the job handle infromation after extracting it from DS JOBS universe table.
I have around 2000 Jobs in a Project , and everything works fine but this takes a long time and sometimes it just hangs (probably I am locking the VOC or something). Can you guys see if I am doing this correctly , if not what will be the most efficient way to do this? Thanks !!!
Cheers !!
I m trying to put some basic information about the datastage jobs in a table or file (like job name , status , job start , job end). I developed a routine which uses the job handle value in the DSgetjobinfo routine and brings this information. I call this routine from a server job which passes the job handle infromation after extracting it from DS JOBS universe table.
I have around 2000 Jobs in a Project , and everything works fine but this takes a long time and sometimes it just hangs (probably I am locking the VOC or something). Can you guys see if I am doing this correctly , if not what will be the most efficient way to do this? Thanks !!!
Cheers !!
Here is the code that I have in my routine , I filter out few enteries before passing the job name to this routine. This routine may not be a very good one as this is one of my initial tries. Can you guys take a look what i am doing wrong?
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
Equate RoutineName To 'GetJobInfo'
Deffun DSRMessage(A1, A2, A3) Calling "*DataStage*DSR_MESSAGE"
JobHandle = ''
JobHandle = DSAttachJob(JobName, DSJ.ERRNONE)
* Message = DSRMessage('DSTAGE_TRX_I_0014', 'Attaching job for processing - %1 - Status of Attachment = %2', JobName:@FM:JobHandle )
* Call DSLogInfo(Message, RoutineName)
Int = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
Begin Case
Case Int = DSJS.RUNFAILED
Info = 'Aborted'
Case Int = DSJS.RUNOK
Info = 'Completed'
Case Int = DSJS.RUNWARN
Info = 'Warning'
Case Int = DSJS.RUNNING
Count = DSGetJobInfo(JobHandle, DSJ.DSJ.JOBEOTCOUNT)
Info = 'Running' : 'Count of Rows Complete' : Count
Case @True ; * all other values
Info = 'Not Defined'
End Case
StartTime = DSGetJobInfo(JobHandle, DSJ.JOBSTARTTIMESTAMP)
EndTime = DSGetJobInfo(JobHandle, DSJ.JOBLASTTIMESTAMP)
Ans = Info : '|' : StartTime : '|' : EndTime
Yes, do that as soon as you are done with the handle, so typically just before the exit point.
And you need to not enable the 'Disable BBCode in this post' option if you want tags (like the quote tags you used) to work properly. I fixed your post, so just FYI at this point.
And you need to not enable the 'Disable BBCode in this post' option if you want tags (like the quote tags you used) to work properly. I fixed your post, so just FYI at this point.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
LOL Thanks !!chulett wrote:Yes, do that as soon as you are done with the handle, so typically just before the exit point.
:idea: And you need to not enable the 'Disable BBCode in this post' option if you want tags (like the quote tags you used) to work properly. I fixed your post, so just FYI at this point.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
Equate RoutineName To 'GetJobInfo'
Deffun DSRMessage(A1, A2, A3) Calling "*DataStage*DSR_MESSAGE"
JobHandle = ''
JobHandle = DSAttachJob(JobName, DSJ.ERRNONE)
* Message = DSRMessage('DSTAGE_TRX_I_0014', 'Attaching job for processing - %1 - Status of Attachment = %2', JobName:@FM:JobHandle )
* Call DSLogInfo(Message, RoutineName)
Int = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
Begin Case
Case Int = DSJS.RUNFAILED
Info = 'Aborted'
Case Int = DSJS.RUNOK
Info = 'Completed'
Case Int = DSJS.RUNWARN
Info = 'Warning'
Case Int = DSJS.RUNNING
Count = DSGetJobInfo(JobHandle, DSJ.DSJ.JOBEOTCOUNT)
Info = 'Running' : 'Count of Rows Complete' : Count
Case @True ; * all other values
Info = 'Not Defined'
End Case
StartTime = DSGetJobInfo(JobHandle, DSJ.JOBSTARTTIMESTAMP)
EndTime = DSGetJobInfo(JobHandle, DSJ.JOBLASTTIMESTAMP)
ErrCode = DSDetachJob(JobHandle)
Ans = Info : '|' : StartTime : '|' : EndTime
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Interesting... and only a partial answer.
Searching for 'EndOfTransmission block' even without the 'block' part only returns this post out of the bajillions here over the years, so not exactly in common use. While I could guess what an EOT block might be, I'd settle for an explanation from the Master.
Searching for 'EndOfTransmission block' even without the 'block' part only returns this post out of the bajillions here over the years, so not exactly in common use. While I could guess what an EOT block might be, I'd settle for an explanation from the Master.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers