Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved]If run date is BD

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved]If run date is BD
 Login/Join
 
Gold member
posted
I have a schedule to run every weekday however I do not want it to run on holidays. I've been able to set my hday file but I need to have it exit if today eq holiday or today is not eq to bd.

Any ideas on the best way to accomplish this?

This message has been edited. Last edited by: TomS.,


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
 
Posts: 65 | Location: Maryland | Registered: January 17, 2012Report This Post
Expert
posted Hide Post
Can you provide the names of the associated tables and fields used in this quandary, including the hday table?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Thanks for responding Doug.

I was actually able to put this together which seems to work well. It will add a workday then subtract a business day and if the business day is not equal to the rundate it will skip to the end and exit.

SET HDAY=us00
SET BUSDAYS=_MTWTF_
-RUN

-SET &RUNDATE = &YYMD;
-SET &NXTWD = DATECVT(DATEADD(DATECVT(&RUNDATE,'I8YYMD','YYMD'),'WD',1),'YYMD','I8YYMD');
-SET &PREVBD = DATECVT(DATEADD(DATECVT(&NXTWD,'I8YYMD','YYMD'),'BD',-1),'YYMD','I8YYMD');

-IF &RUNDATE NE &PREVBD THEN GOTO SKIP;

TABLE FILE BLAH BLAH

END
-SKIP
-EXIT


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
 
Posts: 65 | Location: Maryland | Registered: January 17, 2012Report This Post
Master
posted Hide Post
Since you mentioned that you "schedule" the job, if you use Report Caster set up a generic fex and use that fex as a pre-processing fex. Something like this:
-* skip_holiday.fex
-*
SET HDAY=us00
SET BUSDAYS=_MTWTF_
-RUN
-SET &RUNDATE = &YYMD;
-SET &NXTWD = DATECVT(DATEADD(DATECVT(&RUNDATE,'I8YYMD','YYMD'),'WD',1),'YYMD','I8YYMD');
-SET &PREVBD = DATECVT(DATEADD(DATECVT(&NXTWD,'I8YYMD','YYMD'),'BD',-1),'YYMD','I8YYMD');
-IF &RUNDATE EQ &PREVBD THEN GOTO FINISHED;
-*
-*  Today is a holiday, do not run
-*
-SET &&KILL_RPC=Y;
-SET &&KILL_RPC_ERR=N;
-*
-FINISHED


&&KILL_RPC=Y kills the task and &&KILL_RPC_ERR=N, keeps Report Caster from reporting the exit as an error.

This message has been edited. Last edited by: jgelona,


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Gold member
posted Hide Post
Thank you jgelona. I tried creating the generic fex but it's still moving on to the next task...

This message has been edited. Last edited by: TomS.,


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
 
Posts: 65 | Location: Maryland | Registered: January 17, 2012Report This Post
Master
posted Hide Post
Unfortunately, setting &&KILL_RPC=Y only kills the current task. If you have multiple tasks in one Report Caster job, you have to include the preprocessing fex in each task.

If this is a batch job with multiple tasks and no report distribution (we do this a lot), instead of having multiple tasks like this:

task1 runs job1.fex
task2 runs job2.fex
task3 runs job3.fex

We create a fex named batchjob1.fex that looks like this:

-INCLUDE JOB1
-INCLUDE JOB2
-INCLUDE JOB3

and have just 1 task that runs batchjob1. Since there is now only one task, the pre-processing fex keeps all 3 jobs from running.

A multi-step job with distribution requires a different approach. Say in the above example, I want to add JOB4 that does a report to be distributed via email.

First I set up JOB4 with it's own Report Caster Job that is scheduled as NEVER run. Then I do the above but I add post processing fex to the batchjob1 task that uses DSTRUN to run the RC job that runs JOB4.FEX.

Wish IBI would create a &&KILL_RPCJOB parameter that would kill the entire job then we wouldn't have to jump through these hoops. Probably need to do another NFR.

BTW, since you are wanted to use DATEADD in Dialogue Manager you may want to see my post here:

Get Last Business Day

This message has been edited. Last edited by: jgelona,


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Gold member
posted Hide Post
Thank you jgelona, that would be helpful for IBI to have a kill entire job parameter.

Thank you also for the link, I've only been working with FOCUS for 6 weeks and every bit of informaiton is very helpful.


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
 
Posts: 65 | Location: Maryland | Registered: January 17, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved]If run date is BD

Copyright © 1996-2020 Information Builders