Help/Systems SEQUEL Software PowerTech Skybot Software
Help/Systems
The World's Leader in IBM iSeries Software Solutions

Differentiating report segments by subject line

If you have several reports that process through the same report name in Robot/REPORTS and you distribute these reports using Robot/ALERT, you know that the Robot/ALERT subject line looks the same for all of them. This can be confusing and make finding the information you need difficult. Now, Robot/REPORTS offers a new command, Set Reports Variable Data (REPSETVAR), to create subject lines that reflect the data in the report rather than just the segment description.

Before you begin
You use the REPSETVAR command with segment OPAL code to change the description on a report e-mail subject line dynamically, based on the contents of the report being processed. The segment OPAL code and the REPSETVAR command extract specific text from a report, load it into one or more pre-defined variables, and combine the result with static text (optional) to create the extended subject line of an e-mail.

Prerequisites
To use the REPSETVAR command, you must be using:

  • Robot/REPORTS R07M42 (or higher).
  • Robot/ALERT R05M20 (or higher) to e-mail your reports.
  • Segment OPAL code to process your report segments.

Determine whether a report can use REPSETVAR
If the report is set up and being processed by Robot/REPORTS, you must determine whether it uses bursting instructions or OPAL code. If the report uses bursting instructions and has segments other than *REPORT defined, you should contact technical support for instructions. If the report uses OPAL code and segments, you can add to the existing OPAL. For more detailed instructions, download the Help/FACTS Using the REPSETVAR Command and Segment OPAL from the Help/Systems Web site.

Begin updating the Report Segment OPAL
Use segment OPAL code to locate your text or data in the report and load it (using the CHGTO operation) into one or more OPAL user-defined variables.

  • USRFLD1–USRFLD5 can contain up to 10 characters each.
  • USRLONG1–USRLONG5 can contain up to 45 characters each.

Then, perform the EXECUTE operation with the REPSETVAR command to specify the variables to use in the extended subject line of the e-mail for the report segment. After you have entered REPSETVAR in the Operations Value field, press function key 4 to display the REPSETVAR command prompt panel.

Specify the REPSETVAR command parameters
The REPSETVAR command has six parameters, but only two—Dynamic Variable Name and Dynamic Variable Data—are user-specified. The other parameters are filled in automatically by Robot/REPORTS during report processing and cannot be changed. Use these two parameters to specify the name of the variable you created and the data that it contains. When Robot/REPORTS processes your report segment, the OPAL code you created executes the REPSETVAR command.

Specify the values for the two parameters. When you are finished, press function key 3 to return to the OPAL Report Segment panel.

Complete your OPAL
When the OPAL Report Segment panel displays, complete your OPAL code. Use the QUITPAGE operation at the end of your code to speed processing. When you are finished. press function key 3 to return to the Maintain Reports Segment panel.

Create a subject line
Now, you are ready to create the subject line entry for the report segment. From the Maintain Report Segments panel, enter a 9 next to the segment to display the E-Mail Subject panel and create your subject line. When you are finished, press function key 3 to return to the Maintain Report Segments panel.

Verify your output options
Verify that the output code is either PDF (D), HTML (H), or CLIENT (C). Also verify that "E-mail upon completion" is set to Y. We recommend running a test to verify your work before putting the new setup into production.

If you have any questions or problems, please call Help/Systems Technical Support at 952-933-0609.

Contributed by Kelly Malecha, Technical Consultant