As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have to run a report on every Monday and use the current date for some processing in the report. Here are my queries: 1. How do I pass the current system date to the report? What parameter can be used incase i use -DEFAULT command? 2. If the report is unable to run on the scheduled day(Monday), then it is required to run on the next available day but using the date of Monday itself. How do I achieve this?
Thanks Frank, I get the following output: 03/30/2007, when it should be 03/02/2007. But i guess thats manageable, by not using'+28' !! The second query remains- would the caster be able to run the report if its run date has already passed. Does caster maintain some sort of queue, where the reports would be executed no matter what time they were scheduled to run?
As I understand it Caster "wakes up" every minute to determine if there are any jobs that need to run. If it finds them it runs them. So if the server were down for whatever reason on a given day once the server was back up when Caster woke up it would run any jobs it find.
The problem with using system amper variables -- &YYMD -- is that they will supply the current system date, not the date you need for your report. We get around this by using parameter tables. Here's an example.
We store a process date of 03/05/2007. At run time, we pull the field, hold it, -READ it into an amper variable. The amper variable gets used in all the WHERE conditions. Once we've had a successful run, we update the field on the parm table to the next process date -- 3/12/2007, for example.
So regardless of when the report is kicked off, it will always pull everything since we last processed. Maybe a similar approach could work for you.
Posts: 118 | Location: DC | Registered: May 13, 2005
Torque; Frank gave oyu some great &var's to work with. As for seeing if it is NOT a Monday? Use DOWK subroutine with system (current) date, and depending on the day of the week it returns have a conditional define or -set set up to subtract the number of days backwards to calculate the most recent Monday. Hope this helps..Ira
If Report Caster is not up, it will go back a number of days to pick up missed schedules based on the value put in "Scanback" in the Report Caster Config.
For reports that use the system date, but always should run on a Monday date, though, you can use the following logic.
As far as I understood the second problem, it was not the point that the reportcaster is not up, but the data to be reported was not available.
do something with -IF &RECORDS EQ 0 THEN GOTO NEXTDAY; -* else run the report -GOTO END -NEXTDAY -WRITE NEXTRUN &MONDAY -EXIT
Start this report on reportcaster every day and check if it is either monday or if the file "NEXTRUN" exists. If both conditions are -1 goto the end. If it is monday, just run the program else... If that file exists -READ the value &MONDAY and try to run the report again. If the report is run succesfuly than kill that file and goto the end.
I did this kind of processes already in the DOS time, it must be possible to do it within webfocus too.
I hope it will work.
Frank
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Thanks for all the responses. As I am new to this tool, just want to be absolutely sure. I am describing my understanding below-
Suppose a report is scheduled using Report Caster (RC), such that it automatically runs every Monday. If RC is down on Monday, then RC would itself pick up the report from a 'queue' and run it, without any manual intervention.
Please correct me if anything here is wrong, as such a situation would be a little difficult to check practically, unless it actually happens itself.. and what if it doesnt run then..!!
Yes, this is correct. When ReportCaster comes back up, it will look for all records in the BOTSCHED table who’s NEXTRUNTIME field is less than the current date/time and ReportCaster will run it.
Hope this helps.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
My report has to run from RC every Monday and the current date has to be used in processing. I am doing this using &YYMD presently. Now, consider a case when the server isnt able to run on the scheduled day. When it is up, say on Tuesday, when it would run my report, would &YYMD get me Monday's or Tuesday's date? How can I achieve this if my current approach isnt correct? Are there any variables that can be passed from RC and used as amper variables in the report? Is there any documentation available about RC variables?
Using the &YYMD variable would get you the date on which it actually runs - Tuesday in this case. You could create some other &var as noted previously that moves back to the previous Monday's date using DOWK and subtracting days or DATEMOV. ReportCaster does have the ability to pass paramters to a procedure. You have to turn on the "Prompt for Parameters" property of the procedure. Then when you schedule the task, click on the "Advanced" button and enter the parameter values you want to pass. I don't know how this would apply to your situation as those values would change every time it runs, so I'm not sure this is what you're looking for. Best solution would be to use -SET &vars at the beginning of the procedure to calculate a date that always falls on Monday last. Then you don't have to worry about what day it actually runs because it is always dated as of last Monday - or today if it runs on Monday like it should. (Now what happens when that Monday happens to be a national holiday? :-)
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
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007