Focal Point
[CLOSED] Passing parameters to a scheduled report

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

July 31, 2018, 03:11 PM
jlsnyc
[CLOSED] Passing parameters to a scheduled report
Is there a way to pass parameters to a existing schedule and run the report. For example:

Focexec:
TABLE FILE CAR
PRINT CAR MODEL SEATS DCOST RCOST
WHERE CAR EQ '&CAR'
BY COUNTRY
END

Created CAR_SCHED_TEST.sch schedule to schedule focexec


Running A SCHEDULE FROM URL

URL to run schedule
--https://dev-wbfweb01/ibi_apps/rs/ibfs/WFC/Repository/Development/jls/CAR_SCHED_TEST.sch?IBIRS_action=run---


Note: How do you pass the parameter &CAR to the schedule?

This message has been edited. Last edited by: FP Mod Chuck,
July 31, 2018, 05:15 PM
Waz
This begs so many questions.

Is the &CAR variable fixed or variable ?

IF its fixed, just add the variable to the parameters in the task of the schedule.

If its not, then perhaps you can read the variable from somewhere like a table ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 01, 2018, 12:40 PM
jlsnyc
To answer your question is yes, the name of the parameter is CAR, and it is there in the task of the schedule.

What is the syntax to send to the schedule?

is it
--https://dev-wbfweb01/ibi_apps/rs/ibfs/WFC/Repository/Development/jlsnyc1/CAR_SCHED_TEST.sch?IBIRS_action=run&CAR='BMW'-- if so it is not working it runs the schedule but its not passing the value BMW
August 01, 2018, 05:34 PM
Waz
This is interesting.

I have not seen the ability to manually execute a schedule and pass a parameter.

In my experience, the parameters are hard coded in the schedules task parameter list., and it sends these to the fex on execution.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 02, 2018, 10:51 AM
jlsnyc
Well yes, there is a way to run a schedule and pass parameters to it. Its called DSTRUN , and we are using it today. The problem is that IBI will soon stop supporting and discontinue DSTRUN. We were told we can do the same with WebService, however we are having difficulties with getting this to work. Seems like a lot work to set up WebServices to just run an existing schedule and pass parameters to it. Again the question is there a way to run an existing schedule with parameter from a focexec or URL call
August 02, 2018, 12:15 PM
FP Mod Chuck
jlsync

According to the product manager.. "DSTRUN is currently the only way to run an existing schedule and override the parameter values stored in that schedule.
It is still supported but it is functionally stabilized."

That means that no enhancements or bug fixes will be made to it but it should continue to work for your existing application.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 03, 2018, 12:49 AM
StuBouyer
Theoritically (cause I've never done it) you can use the Restful API to update the schedule with the new Parameter value and the call it to run.

I've succesfully created schedules in the past but never tried to update them

Cheers

Stu

- link to WebFOCUS 80 doco - https://infocenter.information...s/source/topic54.htm


WebFOCUS 8.2.03 (8.2.06 in testing)
August 03, 2018, 09:44 AM
jgelona
We've had been using DSTRUN for years until we moved to WebFOCUS 8. I currently have 55 schedules that are "DSTRUN" schedules. It stopped working with our SSO environment because of the new security model that came out with WebFOCUS 8 (btw, I despise the Security model for numerous reasons and really resent being forced to use it). When we tried to use alternate authentication there was a bug that kept DSTRUN from working. That bug is supposed to be fixed in 8.2. I then had to update all the schedules manually to a "Run Once" and check the "Enabled (Scheduled job runs at specific time)" check box. Then wrote a MODIFY routine to update the next run time to be the current date/time + 1 minute. Needless to say that IBI doesn't like that. With WebFOCUS 8 I have tried to use the restful service, but as no one ever mentions, that requires extra costs and an license key. IBI gave us a key for this purpose but the problem with restful services, anytime you call it to start a job, it returns a web page, which is an issue with doing this in batch. There is no way to call the service without returning the useless page that says the job was submitted and I can't find a way to direct it to nowhere. With my issue supposedly fixed in 8.2, when we get there, I was hoping to be able to go back to using DSTRUN.

If IBI is taking away support for DSTRUN, then they should provide an alternative.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.