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     [CLOSED]WF 8.201M Current and Prior Dates Parameter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]WF 8.201M Current and Prior Dates Parameter
 Login/Join
 
Guru
posted
I need to calculate the beginning and ending dates for both current year and prior year using the -SET parameter. I need to incorporate the -SET parameters in a define based on a report date that is in year/month format and is defined as A6 character field. Thanks.
 
For example, if a user selects a beginning date of 201601 and an ending date of 201712 (a two year period), I need to define counts based on the following parameters.

-SET &BEGIN_CURRENT YEAR (should = 201701)
-SET &END_CURRENT YEAR (should = 201712)
-SET &BEGIN_PRIOR_YEAR (should = 201601)
-SET &END_PRIOR_YEAR (should = 201612) 

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Virtuoso
posted Hide Post
Michele

This should do the trick...


-SET &CURRENT_YEAR = EDIT(&YYMD,'9999');
-SET &PRIOR_YEAR = &CURRENT_YEAR - 1;
-SET &BEGIN_CURRENT_YEAR=&CURRENT_YEAR | '01';
-SET &END_CURRENT_YEAR=&CURRENT_YEAR | '12';
-SET &BEGIN_PRIOR_YEAR = &PRIOR_YEAR | '01';
-SET &END_PRIOR_YEAR = &PRIOR_YEAR | '12';


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Expert
posted Hide Post
For example, if a user selects a beginning date of 201601 and an ending date of 201712 (a two year period), I need to define counts based on the following parameters.
-SET &BEGIN_CURRENT_YEAR = EDIT(&USER_SELECTED_ENDING_DATE,'9999') || '01'; (should = 201701)
-SET &END_CURRENT_YEAR   = &USER_SELECTED_ENDING_DATE;                      (should = 201712)
-SET &BEGIN_PRIOR_YEAR   = &USER_SELECTED_BEGIN_DATE;                       (should = 201601)
-SET &END_PRIOR_YEAR     = EDIT(&USER_SELECTED_BEGIN_DATE,'9999')  || '12'; (should = 201612) 


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Chuck, I don't think this will work because I won't know what date range that the user will choose. The source files has data from 201501 to present. This is how the defines should work. I might need to do defines as opposed to -SET commands. The date in the source table is called DASH_MONTH_VALUE/A6 (year & month). The user will enter a 2 year period date range. Sorry for the confusion in my first post. Thanks.

Start Date the user may enter: 201504
End Date the user may enter: 201703

Current Beginning Year Date = -1 year from the End date the user enters (201604).

Current Ending Year Date = End Date the user enters (201703)

Prior Beginning Year Date = Start Date the user enters (201504)

Prior Ending Year Date = 1 year after the Start Date the user enters (201603)


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Virtuoso
posted Hide Post
Michele

Gotcha... I think Tom has your answer...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Guru
posted Hide Post
quote:
Originally posted by Tom Flynn:
For example, if a user selects a beginning date of 201601 and an ending date of 201712 (a two year period), I need to define counts based on the following parameters.
-SET &BEGIN_CURRENT_YEAR = EDIT(&USER_SELECTED_ENDING_DATE,'9999') || '01'; (should = 201701)
-SET &END_CURRENT_YEAR   = &USER_SELECTED_ENDING_DATE;                      (should = 201712)
-SET &BEGIN_PRIOR_YEAR   = &USER_SELECTED_BEGIN_DATE;                       (should = 201601)
-SET &END_PRIOR_YEAR     = EDIT(&USER_SELECTED_BEGIN_DATE,'9999')  || '12'; (should = 201612) 


Thanks Tom, I had to tweek your code a little, but your code got me started in the right direction. Thanks so much to both you and Chuck.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 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     [CLOSED]WF 8.201M Current and Prior Dates Parameter

Copyright © 1996-2020 Information Builders