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.
This topic has been discussed a lot of times, but I would like someone to help me with a logic for getting the FISCAL Year. I would like to accomplish this in InfoAssist+.
Thank you in Advance for your help.
My requirement is the Federal Fiscal Year.
The federal fiscal year (FFY) is Oct-Sep
NBThis message has been edited. Last edited by: FP Mod Chuck,
In my opinion the best way to accomplish this is to DEFINE this field in the master file description and then InfoAssist+ will just see it as another field choice.
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, 2005
In my opinion the best way to accomplish this is to DEFINE this field in the master file description and then InfoAssist+ will just see it as another field choice.
Thank you FP Mod Chuck. Can you also please suggest me the logic for achieving this.
If you've already separated the date components in the master file you'll only need one define. If you haven't, then you'll have to create two defined fields that'll give you the Year and the Month of the date in question. Then figure out the Fiscal Year based on your specific months. Here's an example I created in InfoAssist. Ideally you ought to put all of these defines in your master file so they're always available.
DEFINE FILE ORDERS
ORD_M/M=ORDERS.ORDERS.ORDERDATE ;
ORD_Y/YY=ORDERS.ORDERS.ORDERDATE ;
FY/I4=IF ORD_M GE 10 THEN ORD_Y +1 ELSE ORD_Y;
END
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Because I have to do a lot of reporting by Federal Fiscal Year and State Fiscal Year (July-June), I have a DEFINE FUNCTION that takes an alpha date field and returns the appropriate Fiscal Year. The reason I use an alpha date is so that I can use this function in Dialogue Manager, TABLE/GRAPH and MODIFY.
DEFINE FUNCTION GETFY(INDATE/A8YYMD,YRTYP/A1)
-*
-* For YRTYP S, get SFY for INDATE (Default)
-* For YRTYP F, get FFY for INDATE
-*
INDATE1/YYMD=INDATE;
INMTH/M=INDATE1;
INYEAR/YY=INDATE1;
YRTYP=IF NOT YRTYP IN ('F','S') THEN 'S';
GETFY/I4=
IF YRTYP EQ 'F' AND INMTH LT 10 OR YRTYP EQ 'S' AND INMTH LT 7
THEN INYEAR ELSE INYEAR+1;
END
-RUN
I store this in baseapp and it is -INCLUDE'd in the edasprof but you can put it anywhere WebFOCUS will find it.
To use it, do the following:
-INCLUDE GETFY
TABLE FILE GGORDER
PRINT ORDER_DATE
COMPUTE ADATE/A8YYMD=DATECVT(ORDER_DATE,'MDY','A8YYMD');
COMPUTE ORDER_FY/I4=GETFY(ADATE,'F');
BY ORDER_NUMBER
END
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, 2006
When you create your synonym (master file) you can select to also decompose the date fields. The different component will then be available.
DECOMPOSE-DATE = OFF or ON
Default: OFF
"ON" will decompose Date fields and date portion of Date-Time fields into Year, Quarter, Month, Day components.
DATEFMT = Year, Month, Day or Month, Year, Day or Day, Month, Year
Default: Adapter specific
Controls mapping of the date format into Master File as YYMD, MDYY and DMYY.
This option can be found under "Customize data type mappings" when creating a Synonym.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Originally posted by MartinY: When you create your synonym (master file) you can select to also decompose the date fields. The different component will then be available.
DECOMPOSE-DATE = OFF or ON
Default: OFF
"ON" will decompose Date fields and date portion of Date-Time fields into Year, Quarter, Month, Day components.
DATEFMT = Year, Month, Day or Month, Year, Day or Day, Month, Year
Default: Adapter specific
Controls mapping of the date format into Master File as YYMD, MDYY and DMYY.
This option can be found under "Customize data type mappings" when creating a Synonym.
Thank you so so much MartinY...I shall try your suggestion and reply back.