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] HDAY with DATEMOV(date, 'PBD')

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] HDAY with DATEMOV(date, 'PBD')
 Login/Join
 
Silver Member
posted
Hi to all,

i have issue with HDAY and Prior business day.
it means if the as of date is 20140102/yyyymmdd
and the holiday is 20140101 so the prior business day should be 20131231. but i am getting 19001231 which is default date instead of 20131231. if as of date is 20140104 and my holiday list is 20140103 then i will get the corect prior business day 20140102. just the issue is with the first of January. my code is as the following
  
-SET &EdaConfPath = FGETENV(7,EDACONF,256,'A256');
-SET &EdaConfPath = TRUNCATE(&EdaConfPath);
-SET &EdaBin = &EdaConfPath |'\bin\';
-RUN

FILEDEF HDAY2000 DISK &&LOCATION|HOLIDAYS.TXT
-RUN
STATE &&LOCATION|HOLIDAYS.TXT
-RUN
-IF &RETCODE NE 0 GOTO NOHOLFIL;
WINNT COPY &&LOCATION|HOLIDAYS.TXT &EdaBin|HDAY2000.ERR
-RUN
SET HDAY = 2000
-RUN
-NOHOLFIL
SET BUSDAYS = _MTWTF_
-RUN

and the defination of Prior business day is:
ASOFDATE/YYMD  = '20140102';
PBD/YYMD       = DATEMOV(ASOFDATE, 'PBD');


how to get the prior business day for the starting year (20131231)?
Thanks,

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.67 & WebFOCUS 80 windows
 
Posts: 45 | Location: Kabul, Afghanistan | Registered: August 07, 2011Report This Post
Virtuoso
posted Hide Post
How is ASOFDATE declared, and how is its value assigned to it?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Silver Member
posted Hide Post
j.gross,

ASOFDATE/YYMD = '20140102';


WebFOCUS 7.67 & WebFOCUS 80 windows
 
Posts: 45 | Location: Kabul, Afghanistan | Registered: August 07, 2011Report This Post
Silver Member
posted Hide Post
thanks,

today i could solve the issue. it means the issue was with holidays.txt.

when i add the 20130101 as holiday in my holidays.txt then able to get the prior business day (20131231) for as of 20140102.

thanks Smiler


WebFOCUS 7.67 & WebFOCUS 80 windows
 
Posts: 45 | Location: Kabul, Afghanistan | Registered: August 07, 2011Report This Post
Guru
posted Hide Post
A somewhat annoying limitation to the Holidays file is that you must have at least on entry for every year that you might check a date against. Otherwise you recieve a Zero value.

This is documented but very east to miss - from the Function Manaul on "specifying Holidays"

quote:
Each year for which data exists must be included. Calling a date function with a date
value outside the range of the holiday file returns a zero for business day requests


Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report 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] HDAY with DATEMOV(date, 'PBD')

Copyright © 1996-2020 Information Builders