DSSendMail with %fullreport%

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
binf
Participant
Posts: 3
Joined: Thu Mar 16, 2017 4:04 am

DSSendMail with %fullreport%

Post by binf »

Hello,

I am new in the datastage field. To understand how I can work with datastage I wanted to reproduce the notification stage with the %fullreport% functionality. The basics I have also understood (with the help of the routine DSSendMailTester) but how can I install the "fullreport" functionality.

Current I get the report from the job "ownEmailScript" (see images). But I want the reports of the jobs, which creates a warning and pass the sequencer. For my understanding, DSLink13 should contain the corresponding Job_Handler. But how can I query this?

Thanks binf

Image
Big

ImageBig

ImageBig

Image
Big
binf
Participant
Posts: 3
Joined: Thu Mar 16, 2017 4:04 am

Post by binf »

Can no one help me? How can I query the Job_Handler which pass through the sequencer?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry... wasn't quite sure what you were trying to do and did not come back to this until now. I for one am not familiar with "%fullreport%" and don't have access to check. Are you trying to replicate the Job Status in email checkbox option from the Notification Activity stage in a custom routine? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Okay, I see that is indeed what this is all about. Probably need to wait for people with that specific knowledge to reply, that or get help from your official support provider but in the meantime I doubt that simply including the token in your call to DSSendMail will get you what you want. I would imagine that it is the job of the Notification Activity stage itself to prepare the information that token needs.

From what I recall, you may get some clues by examining the generated sequence job code on the Job Control tab of the job itself. It will show how each job's status (which I'm guessing is what you mean by "job_handler") is tracked in an array of some kind...
-craig

"You can never have too many knives" -- Logan Nine Fingers
binf
Participant
Posts: 3
Joined: Thu Mar 16, 2017 4:04 am

Post by binf »

Hello, thanks for reply.
chulett wrote:I doubt that simply including the token in your call to DSSendMail will get you what you want.
I thought so, but I get only the report from the "ownEmail"-Job.

To my understanding, all jobs that are executed before the sequencer would have to be addressable in the form of "DSAttachJob". So a handle should returned which is used for addressing the job. If a job throws an error, now the sequencer should get the handle. (see first image) ... and I need that handle for other function like "DSGetJobInfo", .... But how do I get/access this handle?

Or am I completely wrong?

Thanks binf
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you are letting the Sequence job run everything, then in your custom routine you would need to attach to the job(s) in question again - establish a new handle for the routine to use - and then call any other API functions like DSGetJobInfo. Don't forget to release it when you are done.

You have more options if you "roll your own" job control code rather than letting the Sequence job and Job Activity stage generate the code and run the jobs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply