You can use a user process to generate an electronic form with EZ Print/400 or Optio and send the electronic form to multiple email addresses automatically. Because EZ Print/400 doesn't allow you to pass a report's user defined data, you need to pass information in the 10-character user data. So, instead of embedding an email address directly, set the user data with a mail-key value that points to associated email address for the report.

Note: While these instructions also work for text reports, RJS Software recommends that you use embedded email addresses for non-EZ Print/400 report files. These instructions are geared toward EZ Print/400 and other non-text reports where you cannot use embedded email addresses.

In your CL program, call the WSPMAILKEY command to retrieve a unique 10-digit mail-key value to place in the spool file's user data. Mail keys have the format: EML0000001

For example: WSPMAILKEY RTNKEY(&MAILKEY)

Call the WSPADDRESS command to set up any destination email addresses for the report. Each call to the command can have up to 10 destination email addresses. If you need more than 10 email recipients, call WSPADDRESS multiple times for a single report.

Use the OVRPRTF command to set the mail-key value in the new spool file's user data.

For example: OVRPRTF FILE(QSYSPRT) USRDTA(&MAILKEY)

Put the report in an output queue for EZ Print/400 to process it.

Set EZ Print/400 up so that, when it processes the report, it creates the new report in a temporary holding output queue. Do not send the report to the WinSpool/400 Email Report Server output queue yet.

All EZ Print/400 files to email are now in the temporary output queue, and each report has a unique user data value in the format EMLxxxxxxx. If you are not emailing a particular EZ Print/400 report file, set the user data to a value other than EMLxxxxxxx or leave it blank.

Choose one of the following two options for emailing the files:

Use WSPROUTE to manually read all spool files in the temporary output queue and move them to the WinSpool/400 Email Report Server output queue. You can embed WSPROUTE in your processes or call it manually from a menu. WSPROUTE automatically creates a copy of the report for each recipient in the email output queue.

For example: To read all reports in the EZPRINTHLD output queue, send reports with a mail key (EMLxxxxxxx) to the EZEMAIL output queue for WinSpool/400 Email Report Server, and then move them to the EZPRTSAVE output queue for back-up, use:

Use WSPROUTMON to automatically read all spool files in the temporary output queue and move them to the WinSpool/400 Email Report Server output queue. You can embed WSPROUTMON in your processes, call it manually from a menu, or submit it as an iSeries batch job. WSPROUTMON runs continually until its end time. To run WSPROUTMON endlessly, enter 000000 for the end time.

For example: To read all reports in the EZPRINTHLD output queue, send reports with a mail key (EMLxxxxxxx) to the EZEMAIL output queue for WinSpool/400 Email Report Server, move them to the EZPRTSAVE output queue for back-up, and set the monitor to run every 300 seconds (5 minutes) until 4:00pm, use: