Focal Point
[SOLVED] Passing parameter to Dynamic Address Procedure

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

May 19, 2010, 11:10 AM
DD
[SOLVED] Passing parameter to Dynamic Address Procedure
Hi,
We are storing the Burst value and email address in a table for each schedule name. We created a Fex based on this table with a Parameter for Schedule_name sothat it brings back right email address for the related schedule. Then we created a schedule and selected Dynamic Addrees as the Distibuution list option and picked the above procedure, but it did not prompt for the Schedule_name parameter.
Is there any thing special we need to do to get Dynamic Address Procedure Parameters prompted in Rcaster ??

Thanks,
DD

This message has been edited. Last edited by: Kerry,


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
May 19, 2010, 04:15 PM
Darin Lee
I don't believe that you can have prompting in a dynamic address procedure. Everything it needs to run must be available within the procedure or available in an external file that can be read.


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
May 20, 2010, 11:41 AM
DavSmith
Darin is correct.

To pass the schedule name from the main Caster job, we perform a -WRITE of the name to a temporay text file in BASEAPP.

The DYNAMIC distro fex picks up the name from BASEAPP by doing a -READ. The same fex then DELETES the text file.

Simple example using the CAR file:

-*Main Caster Job fex
-DEFAULTS &SCHED_NAME='CAR1'
APP FI SCHED DISK baseapp/SCHED.TXT
-RUN
-WRITE SCHED &SCHED_NAME
TABLE FILE CAR
SUM SALES
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
END


-* DYNAMIC Distro fex
APP FI SCHED DISK baseapp/SCHED.TXT
-RUN
-READ SCHED, &SCHED_NAME
!del e:\mreprod\ibi\apps\baseapp\sched.txt
SET ASNAMES=ON
TABLE FILE SCHED
PRINT EMAIL_ADDRESS AS DEST
BY VALUE
IF SCHED_NAME EQ '&SCHED_NAME'
ON TABLE PCHOLD
END


Note that IBI confirmed, by way of a case I just opened, that using FOCCACHE to store the text file will not work. I thought using FOCCACHE would be a cleaner method instead of doing a delete.

quote:

Here is the relevant documentation on use of FOCCACHE:

http://documentation.informati...ml/pdf_wf_76/wf_zos_
762install.pdf

See page 13-29:

"Each time a WebFOCUS user logs into the Managed Reporting (MR) environment a new session with its own foccache directory is created. Files that were stored in a prior foccache directory are no longer accessible. When the user logs out of MR the foccache directory used within that MR session is no longer accessible."

In the ReportCaster environment, there is no common session between the main procedure and the procedure invoked through the dynamic distribution list. Therefore FOCCACHE cannot be shared in this situation.



The IBI help person said that this has already been opened as an NFR so I added our name to the request.

In the meantime, storing the file in BASEAPP (or other folder of your choice) seems to be the best/easiest/only way to pass the schedule name to the DYNAMIC distro fex.

David



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
May 20, 2010, 11:55 AM
Darin Lee
Thanks for the confirm. We do the same for some of our jobs - write out the parameters used to run the main job and then read them back in for the dynamic distribution list procedure. The lack of a common session would also preclude from just using a hold/save file in edatemp as well. (Additionally, there is the situation where the dist list proc doesn't even run on the same server as the main proc).


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
May 21, 2010, 10:08 AM
DD
Thanks Alot David!!!!
I will try it.
Have a nice weekend.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
May 21, 2010, 02:03 PM
DD
Thanks David!!!
It worked GREAT...
We really appreciate all of you guys time and Help.
Have a great weekend.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF