Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Email Queries

Former Member
0 Likes
645

I've received a request to put together functionality that will email a Sales Rep Orders List query to the appropriate sales office. The customer wants to run this report in batch for all sales offices and email the reports to each office in the same job. Has anyone accomplished such a task?

Thank you in advance for your input,

JR

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
620

Hi Joseph,

In the job definition you can use the "Spool list recipient" for this. Just make a list of all people who should get the output and specify their email adress, they will receive the output with the mail as an PDF attachment.

Regards,

John.

I've received a request to put together functionality that will email a Sales Rep Orders List query to the appropriate sales office. The customer wants to run this report in batch for all sales offices and email the reports to each office in the same job. Has anyone accomplished such a task?

Thank you in advance for your input,

JR

4 REPLIES 4
Read only

Former Member
0 Likes
621

Hi Joseph,

In the job definition you can use the "Spool list recipient" for this. Just make a list of all people who should get the output and specify their email adress, they will receive the output with the mail as an PDF attachment.

Regards,

John.

Read only

0 Likes
620

Thank you John for your reply. The sticking point here is that each report, meaning one for each sales office, will need to be emailed to that one location. It is not a scenario where one report will be sent to many as in the distribution list you mentioned. There will need to be some logic on sales office break that will email that offices portion of the report to them. Kind of like running the report individually for each office then emailing. Does this confuse the issue?

Read only

0 Likes
620

Hi,

Use JOB_OPEN to schedule a job in the background.

Then call the appropriate program using the SUBMIT (progname)......AND RETURN.

Then, call the JOB_CLOSE to close the job.

These steps can be given inside a loop..endloop, where in you can dunamically change the jobname in the JOB_OPEN and also dynamically submit the program name.

Regards

Subramanian

Read only

0 Likes
620

It surely is not possible to use the recipient list in this way. Or indeed, you should run the report for each office and then email each report.