This document shows you how to use three Sequel commands in two scripts to repetitively burst a Client Report (CRO) and send separate report sections to different email addresses. This example sends a specific report to each manager of a region.
This approach is easily accomplished using two scripts. One script creates a client report for each region, and sends it to the appropriate manager. The second script repetitively runs the first script as many times as there are managers listed in a manager file.
RUNCMD CMD('RUNSCRIPT SCRIPT(YourLib/SCRIPT2) SETVAR((_&®on ''_&®on'') (_&&email ''_&&emailadd''))') SQL('select regon, emailadd from sequelex/regmgrlst')This script repetitively runs the second script once for each record in the REGMGRLST file. Also, there are no variables to define in this script—the variable values for region and email address are dynamically passed from the REGMGRLST file.
RUNRMTCMD CMD('"\program files\sequel viewpoint\viewpnt.exe" /V:YourSystem/YourLib/YourCRO /SETVAR((regon ''&®on'')) /D:\\YourSystem\tmp\Region&®on.pdf /F:*pdf') RMTLOCNAME(YourVPServer *IP)
ESNDMAIL RECIPIENT('&&email') SUBJECT('PDF file from CRO for Region &®on') ATTLIST((* *DFT '/tmp/Region&®on.pdf' *N * *LAST *ONLY))This script issues the Run Remote Command (RUNRMTCMD) against a configured ViewPoint server. The client report is run for a single region and a PDF file is created on the IFS. This file is then sent to the appropriate manager using the ESEND Mail command (ESNDMAIL).
Still have questions? We can help. Submit a case to Technical Support.