Focal Point
Reportcaster - setting email subject dynamically with a parm

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5261019732

July 20, 2007, 09:13 AM
HokieMark
Reportcaster - setting email subject dynamically with a parm
I have a FEX that is run by Reportcaster with a parm indicating for which sales office to produce the report. Is there a way to get this parm to show up in the email subject line? Currently, the users get a series of emails with the same subject line.
July 20, 2007, 09:22 AM
Leah
When the caster job is set up, is it the only fex executed in the job? If so the subject line can be tailored right as part of caster, if not, I'm not aware of how. Any one else out there know?


Leah
July 20, 2007, 09:52 AM
HokieMark
Leah,
we are triggering the Reportcaster from the mainframe using the DSTRUN subroutine with the following arguments:

DYNAM ALLOC DD SUBLOG DA TS.WEBF.PROD.ERROR.FSCRANNU SHR REU
-RUN
-SET VAR1='selWrtAgy=A000013300 WESTERN PA FINANCIAL SERVICES';
-SET VAR2=44;
-SET &SUBERR = DSTRUN(
-'iseda',5,
-'ibieda#',7,
-'172.18.0.17:80',14,
-'S12ffd2tua01',12,
-'FSCRANNU',8,
-1,
-'iseda',5,
- &VAR1,&VAR2,
-'iseda/ibieda#',13,
-0,
-'I4');
-IF &SUBERR EQ 0 GOTO EXIT;
-INCLUDE DSTRUNER
-WRITE SUBLOG &SUBERR
-EXIT

I would like the email subject for this run to say "A000013300 WESTERN PA FINANCIAL SERVICES" which is the parm passed to the FEX to select the data.

Thanks,Mark
July 20, 2007, 10:12 AM
Leah
I'm not familiar with setting up caster on the mainframe, but we do submit caster jobs using dstrun on our server, and the caster job has to be defined in order to kick it off. We actually have a procedure on the mainframe that builds the job that submits the caster job on our Windows WebFOCUS server. All in the name of keeping software costs down.

Of course if it is submitted several times with different parms then I would be in the same 'boat'.


Leah
July 20, 2007, 11:56 AM
Darin Lee
As Leah mentions, to use the DSTRUN, the job must already be set up in caster. If the job is already set up, it doesn't accept additional parameters for the job (just for the fex that it will be running.) You could possibly set up bursting by the parameter values which are added to the name of the output file. Using the API to dynamically set up the job would allow you to cutomize the subject line, but that's not necessarily going to work in your case where you're trying to trigger the run from the mainframe.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
July 20, 2007, 01:49 PM
HokieMark
Darin and Leah,
FYI I found the following post:

https://forums.informationbuilders.com/eve/forums/a/tpc/...971019422#1971019422

The solution in Roland's response is working for me.
Thanks for your responses.
July 20, 2007, 02:23 PM
Leah
Thanks for the link. I sometimes miss information as when I'm gone for a while I don't try to read all the posts. I do find it quite useful though.

Great weekend everyone.


Leah