Focal Point
Report Caster Scheduling

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

June 14, 2008, 01:03 PM
Navaneeth
Report Caster Scheduling
Hi,

This is further to my previous post.


Sorry I could not understand your answers, it way over my head.

I will explain it again.

As per my requirement
1. I need to run the reports only on Business weekend so that it fetches me data only for that weekend. Now if I schedule a report in Report Caster , I guess it schedules only by Fiscal Calendar ( Normal Calendar) .

So how do I overcome this issue.

I have similar case where a particular report should only run on Business month end date and others on a business Year End date only.

“ Hi Gelona

In your reply you had sent me the following

-* File pp712.fex
-*
-* Pre-Processing for lnch712.
-*
-* Run job if the current date is the 3rd business day of the month
-*
-SET &RUNDT=DATECVT(DATEADD(DATEMOV(DATECVT(&YYMD,'I8YYMD','YYMD'),'BOM'),'BD',2),'YYMD','I8YYMD');
-IF &RUNDT EQ &YYMD THEN GOTO FINISHED;
-*
-SET &&KILL_RPC=Y;
-*
-FINISHED

Can you explain more on this , as it closely matches one of my requirement.

And what does the following cmd do “- set &&kill_rpc='y' ”



Thanking you in advance

Regards
Navaneeth

WebFocus 7.1.4
June 16, 2008, 09:28 AM
jgelona
Navaneeth,

First in Dialogue Manager (DM) all variable are strings, so 20080616 can be a representation of a date or it could be a number. Now routines like DATEADD and DATEMOV only work with smart dates so the first thing I do is convert the current date (&YYMD=20080616) to a smart date. We do that with:
DATECVT(&YYMD,'I8YYMD','YYMD')

Next, I use DATEMOV to change the date to the 1st day of the month
DATEMOV(DATECVT(&YYMD,'I8YYMD','YYMD'),'BOM')

Then I add 2 business days
DATEADD(DATEMOV(DATECVT(&YYMD,'I8YYMD','YYMD'),'BOM'),'BD',2)

Finally, I convert the smart date back to a string that DM understands
DATECVT(DATEADD(DATEMOV(DATECVT(&YYMD,'I8YYMD','YYMD'),'BOM'),'BD',2),'YYMD','I8YYMD');

What I have done is use the current date to find the 3rd business day of month. I then compare that date to the current date. If the are the same, the current date is the 3rd business day the -SET is skipped and the job runs. If they are not the same, then I set &&KILL_RPC to 'Y' and Report Caster kills the job. &&KILL_RPC is a System Global Variable.

Note that when using business days, if you use a holiday file, that will be taken into account. For example, this year, Sep 1st is a holiday in the USA, so the 3rd business day is the 4th. If you don't use a holdiday file, the 3rd business day is the 3rd. In August, the 3rd business day is the 5th.

The other thing to keep in mind is that if a job has multilple tasks, each task has to execute the pre-processing fex to keep it from running.

Sorry that I cannot help more, but I still don't understand your requirement. You need the answers to the following questions:



In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
June 19, 2008, 11:57 AM
Navaneeth
Hi Gelona,

Thanks a lot for your explanation., it was really helpful.

I have a small question here, when we get the current date, is it string format??
But in say Oracle db, wont be storing it in date format, Well my question is if we are going to compare the current date with a date from the table then we need to DATECVNT function and current date to a date format and then do the comparison.

To answer to your question

• When is the job going to run? What is the schedule? Is it something like Monday at 1am?
All my reports should run based on accounting calendar, i.e. ( from Feb to Jan), most of the reports should run for previous week or month. There are few reports which says it should run on the last Monday of the accounting month (6Am) and first Monday of the following accounting month (6am)
• When it runs, what is the time period? Is it the previous week? month? Monday-Friday?
Yes it is either previous month or previous week

• How is the time period determined? Is it input from a screen? Can it be computed from the current date?
It should be computed from the current timestamp / current date. Since my reports is based on accounting calendar ( Feb. to Jan) should I ask the DBA to provide me a Accounting Table Dimension

again thanks a a lot for helping me out. It really helps me…

Regards
Navaneeth