I'm referring to an HTML page used to launch reports. Does this tool apply?
WebFOCUS 8 Windows, All Outputs
March 08, 2017, 05:20 PM
Waz
Possibly, but no sure.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 09, 2017, 11:19 AM
manglum
What about this.... is there a way to execute a schedule from a .fex? In other words, can I create a button on my .html that runs a .fex which runs my schedule (or schedules)?
WebFOCUS 8 Windows, All Outputs
March 09, 2017, 03:34 PM
Waz
Yes, I have done this with web services.
It requires two steps.
Login call
Execute call
The web services needs to be defined as a master.
But if you just want to call a scheduled report from an HTML page, then the web service call should do it, you will have to create a drill to a javascript function to do it.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 10, 2017, 11:46 AM
FP Mod Chuck
Hi Manglum
The Web Services method is definitely a viable alternative but your company has to be licensed for the Web Services Ennoblement option.
In the html composer there is an option to schedule a procedure. You have to add the procedure under the Requests and Data Sources tab and then when you click on the button (or object) you want to use to schedule the procedure under Tasks and Animations you create a new task and have the Requests/Actions be to schedule the procedure.
I hope this helps!
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 10, 2017, 11:53 AM
FP Mod Chuck
Hi Manglum
I needed to add one more thing. Once you select the procedure to schedule the target type needs to be set to schedule and then choose the Target/Template name of the output you want them to be able to schedule.
Regards
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 14, 2017, 04:55 PM
manglum
Thanks Chuck, however I'm not looking to schedule a report. I have already scheduled the report. What I want to be able to do is manually run the scheduled report via a button on my .html
The schedule I am referring to above is set to recur every day at 5pm but I have the need sometimes to run it manually rather than waiting for 5pm.
I wanted to create that functionality on my .html so that I didn't have to navigate to the specific schedule file and run it directly from the schedule file. Hope that makes sense.
Craig, your solution(s) seem to be exactly what I want.
Couple of noob questions: 1. where would I go to get the schedule ID? 2. What is the proper syntax for using DSTRUN? I tried searching for that function in the help documentation and nothing came back.
Thanks so much for your help!
WebFOCUS 8 Windows, All Outputs
March 15, 2017, 11:36 AM
jgelona
I may have a solution for you. Before Restful Web Services IBI has a routine called DSTRUN. This would run a schedule on demand. However, with WebFOCUS 8 and the new security, unless you were running just basic security, it would not work and from what I have been told, IBI has no plans to restore that function. I have 40+ jobs the were executed this way so I had to come up with a workaround.
My answer was a .fex that set the Next Run Date Time in the schedule to the current date/time + 1 minute. The trick is getting the current date/time in Zulu date/time format. Since we are Linux, it was pretty easy. Our repository is MSSQL and we have the adapter for that.
See below:
-* File rc_submit.fex
-*
-* This job tell Report Caster to submit the desired job for execution at the
-* current time plus 1 minute
-*
-* The only parameter is the Report Caster schedule id
-*
-* To use this in a fex, do the following
-* -SET &RCJOBID=scheduld_id;
-* -INCLUDE rc_submit
-*
-* To use this in Report Caster, add the following in the pre or post processing fex
-* baseapp/rc_submit RCJOBID=schedule_id
-*
-*-SET &RCJOBID=S52089096s861bs4dc2sa025s8c0779769b44;
-*
APP PATH report_caster
-*
-* Get the Interval Id for the schedule
-*
TABLEF FILE BOTSIT
PRINT INTERVALID
WHERE SCHEDULEID EQ '&RCJOBID'
ON TABLE SAVE
END
-RUN
-READ SAVE &LNGTH.6. &INTERVALID.64.
-RUN
-SET &INTERVALID=TRUNCATE(&INTERVALID);
-UNIX rm save.ftm
-*
-* Get the next run date/time in zulu time plus 1 minute
-*
APP FI ZULUTIME DISK zulutime.txt ( LRECL 32 RECFM V
-RUN
-UNIX date +%s > zulutime.txt
-RUN
-READ ZULUTIME &ZULUSEC.32.
-RUN
-*
DEFINE FILE MACGYVER
ZULUSEC/P32=&ZULUSEC;
ZULUDAYS/I9=ZULUSEC/86400;
ZULUHRS/I9=(ZULUSEC-(ZULUDAYS*86400))/3600;
ZULUMIN/I9=(ZULUSEC-((ZULUDAYS*86400)+(ZULUHRS*3600)))/60;
ZULUTIME/P32L=((ZULUDAYS*86400)+(ZULUHRS*3600)+((ZULUMIN+1)*60))*1000;
END
-*
TABLE FILE MACGYVER
PRINT ZULUTIME
IF COUNTER EQ 1
ON TABLE SAVE
END
-*
DEFINE FILE MACGYVER CLEAR
END
-RUN
-READ SAVE &NEXTRUNTIME.32.
-RUN
-UNIX rm save.ftm
-TYPE .
-TYPE . Submitting:
-TYPE . Schedule Id: &RCJOBID
-TYPE . Interval Id: &INTERVALID
-TYPE . Zulu Time: &NEXTRUNTIME
-TYPE .
-*
MODIFY FILE BOTSIT
FIXFORM INTERVALID/64
MATCH INTERVALID
ON MATCH COMPUTE NEXTRUNTIME='&NEXTRUNTIME.EVAL';
ON MATCH UPDATE NEXTRUNTIME
ON MATCH SQL COMMIT WORK
ON MATCH/NOMATCH GOTO TOP
DATA
&INTERVALID
END
-RUN
Hope this helps.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
March 15, 2017, 12:14 PM
manglum
JGELONA, That looks great. I'm getting an error as follow:
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: BOTSIT
not sure if that means that I don't have proper security to access this table or if the table itself is different in my environment?
WebFOCUS 8 Windows, All Outputs
March 15, 2017, 12:26 PM
Francis Mariani
The WebFOCUS metadata (.mas and .acx) for the Report Caster tables (BOT*) must be in a folder in the application path.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 15, 2017, 12:27 PM
Doug
Thanks John and Francis, That looks good. Now to get the right to report_caster / BOTSIT which may be a stretch.
(one more post to get my "posts" = "curent year")
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206