Focal Point
[CLOSED] RC - Skip Secondary Interval once report up

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

April 26, 2010, 08:44 PM
Prakash
[CLOSED] RC - Skip Secondary Interval once report up
Hi Folks,

Need your expertise!

I have a RC job which is scheduled at 4:00 AM CST everyday, this job checks the data load condition and generates the report (if load is complete) or kills the job (if load not complete).
I run this job (using secondary interval) in intervals of 15 min for 3 hours.

Is there a way not to process the job once load is complete irrespective of the job scheduled for 3 hours.
Ex: If load completes at 5:00 AM CST (the job would have run 4 times by then) and my report will be up before 5:15 AM CST, can I stop the 5:15 AM and future schedules for the day instead of running it till 7:00 AM CST?

What would be the best approach in this scenario..Thoughts please??

Thanks,
Prakash

WebFOCUS ver - 7.6.9
Environment - Windows
Output - HTML report pushed to email

This message has been edited. Last edited by: Kerry,
April 26, 2010, 09:03 PM
Waz
I think this can be done in one of the BOT Tables.

There is probable other better ways. Its been years since I used RC.


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!

April 26, 2010, 09:24 PM
Prakash
Thanks for the reply!

Could I get an example on how to do this?
April 26, 2010, 11:37 PM
Waz
I think you will have to wait for the super stars of RC to reply. Smiler

We don't have RC here any more, so I can't even test things out. Frowner


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!

April 27, 2010, 12:10 AM
Prakash
It would be great if someone has a solution to tackle this scenario, RC experts need your help :-)
April 27, 2010, 08:52 AM
CLH
You should be able to set it up as an alert schedule. When the condition is met the alert (in this case the report) is sent. Then you can choose what you want to occur after ther alert. You can choose to have the scheule continue running, not to run again, Or deleay for a specified period of time.


Webfocus 8.0.7 on Windows
April 27, 2010, 09:44 AM
Prakash
Could you give me an example to try?

Thanks,
Prakash
April 27, 2010, 03:38 PM
Dennis_H
It's been a while since I've worked with RC also... however, I used to use a Pre-Procedure in the RC scheduling that would look for a "cookie crumb" file on the server. The last successful run of the main procedure would create (or recreate) that file and load it with a run-timestamp so the Pre-Procedure could dash-READ the file and ID the run as "today's" rather than last month's.

If the file is there and loaded with today's date, a command to cancel the run was executed and that prevented the main procedure from running again; otherwise, the cancel was bypassed and the pre-procedure just ended, allowing the main procedure to run.

Unfortunately, I don't recall the syntax of the "cancel run" command, but maybe somebody else out there can help you with that.

Best regards.


WebFOCUS 7.6
Windos, all output
April 27, 2010, 04:24 PM
Dan Satchell
The command to place in your pre-processing step to cancel the main report procedure if your condition is not met is -SET &&KILL_RPC = 'Y';


WebFOCUS 7.7.05
April 28, 2010, 08:47 AM
CLH
There is an alert wizard in developer studio that will help you build the fex. Basically it is just a fex in two parts the first part checks for the condition if met it uses goto to execute the report code if not met it exits. Then in report caster you schedule the fex the same as any other. Caster will recognize the fact that it is an alert schedule and you will get an addition button on the task this button allows you to pick what you want to occur once the alert has been triggered and the report runs successfully. The choices are Automatically reset, Continue after Alert, Deactivate Schedule after alert or delay which restarts the alert after a specified time period. The descriptions of these are in the report caster admin manual. It's pretty straight forward. As an example I have an input file that has to be present before I run the rest of the flow. The alert procedure first thys to print 3 records from this file and does and on table hold. Next step in the alert procedure will check if lines eq 0 goto alertexit else execute my main procedure for the flow. It keeps checkin until condition is met then resets for the next day.


Webfocus 8.0.7 on Windows
May 01, 2010, 04:59 AM
Prakash
Thanks for the inputs!
I used pre and post processing to handle the scenario, it's working fine, but anyways it's more like a workaround so I will try my hand on Alert as well and use whichever is optimistic.