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] Define; last quarter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Define; last quarter
 Login/Join
 
Gold member
posted
I am simply trying to find the last quarter.
Date_YYYYQQ is A6
Date_Calendar_Year is I4

I have the following define.

  DEFINE FILE DM
iYYYYQQ/I6=EDIT( Date_YYYYQQ );
aQQ/A2=EDIT( Date_YYYYQQ, '$$$$99');
LastYYYYQQ/I6=IF aQQ EQ '01' THEN ( Date_Calendar_Year -1)|04 ELSE iYYYYQQ-1;
END  


results in:
  0 ERROR AT OR NEAR LINE      4  IN PROCEDURE ADHOCRQ FOCEXEC *
 (FOC279) NUMERIC ARGUMENTS IN PLACE WHERE ALPHA ARE CALLED FOR 


I know aQQ EQ '01'. what is the issue.

As a side issue;
When I try iQQ/I2=EDIT( Date_YYYYQQ, '$$$$99');
I get:
  (FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: iQQ 

Why does editing the alpha to Int work without the mask, but breaks when Include the mask?


Thanks all-

This message has been edited. Last edited by: Nicholas Spyrison,


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
 
Posts: 92 | Registered: July 31, 2015Report This Post
Platinum Member
posted Hide Post
Hi Nicholas,

The problem is with
( Date_Calendar_Year -1)|04
. You can not use string concatenation with numbers.
Try following:
100 * (Date_Calendar_Year -1) + 4


Martin.


WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
 
Posts: 168 | Registered: March 29, 2013Report This Post
Virtuoso
posted Hide Post
You could try:
  
DEFINE FILE CAR
QR/I2=IF LAST QR EQ 4 THEN 1 ELSE LAST QR + 1;
Date_YYYYQQ/A6 WITH COUNTRY='2015' | EDIT(QR) ;
QQ/I2=EDIT(EDIT(Date_YYYYQQ,'$$$$99'));
AQQ/I2=(QQ - 1) * 3 + 3;
AYYYYQQ/A8YYMD=EDIT(Date_YYYYQQ,'9999') | EDIT(AQQ) | '01' ;
FYYYYQQ/YYQ=AYYYYQQ;
LastYYYYQQ/YYQ=FYYYYQQ - 1;
END
TABLE FILE CAR
PRINT 
 COUNTRY LastYYYYQQ
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Gold member
posted Hide Post
Thanks Martin!

Got it working after running into a multiple hierarchy issue.

One more quick question:

given:
 Date_YYYYQQ/A6 WITH COUNTRY='2015' | EDIT(QR) ; 


Could someone explain what "WITH COUNTRY" is doing? is it tying Date_YYYYQQ to the COUNTRY Grain level?


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
 
Posts: 92 | Registered: July 31, 2015Report 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] Define; last quarter

Copyright © 1996-2020 Information Builders