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.
I am trying to compare two files with dates in them. Something like this: MATCH FILE FILE1 PRINT DATE1 BY KEY RUN FILE FILE1A PRINT DATE1A BY KEY AFTER MATCH HOLD OLD-OR-NEW END DEFINE FILE HOLD CMP1/A1 = IF DATE1 EQ DATE1A THEN 'Y' ELSE 'N'; END TABLE FILE HOLD PRINT DATE1 DATE1A CMP1 BY KEY END
Since the date is missing in 1 file I get this error:
(FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED
If both dates are missing the CMP1 value should be "Y".
What is the best way to compare the dates when one or both may be MISSING?
GaryThis message has been edited. Last edited by: GaryB,
Posts: 29 | Location: Seattle Washington | Registered: July 08, 2009
You're not getting the error because a date is missing, you're getting the error because the formats of FILE1.DATE1 and FILE1.DATE1A are not the same, the code fails in this line:
CMP1/A1 = IF DATE1 EQ DATE1A THEN 'Y' ELSE 'N';
In my opinion, it is unusual to MATCH data in the same file, so perhaps describing what you're attempting to do might help us come up with suggestions.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Why do you need to use MATCH for this? Both fields are in the same file? Just do the DEFINE and TABLE on FILE1 and make sure the dates are in the same format, if not then do a DEFINE on one of them to make it the same format as the other one!
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006
I am matching data from one system to another. In this case and SAP table, and ClickSchedule. There is an interface from ClickSchedule that updates SAP, but it does not always work. I need a report that checks the values in both SAP and ClickSchedule. There are two date fields, and three text fields that are compared. In some cases SAP is missing the record entirely. I get the error when the date is MISSING (Yes it is really MISSING) in the hold file.
The date fields (and text fields) in my "real" are all the same format.
I typed my example from scratch, because the CAR database doens't have a date fields.
Gary
Posts: 29 | Location: Seattle Washington | Registered: July 08, 2009
I would be double checking my formats in the databases....then double checking the format after the match. There must be something different by definition of that error.
81.05 All formats
Posts: 56 | Location: Manchester | Registered: November 21, 2006
CMP1/A1 MISSING ON = IF DATE1 EQ DATE1A THEN 'Y' ELSE 'N';
I had to test the missing values to get the a value when the data is missing.
CMP1/A1 = IF DATE1 IS MISSING AND DATE1A IS MISSING THEN 'Y' ELSE IF DATE1 IS MISSING THEN 'N' ELSE IF DATE1A IS MISSING THEN 'N' ELSE IF DATE1 EQ DATE1A THEN 'Y' ELSE 'N';
G
Posts: 29 | Location: Seattle Washington | Registered: July 08, 2009
CMP1/A1 = IF DATE1 IS MISSING AND DATE1A IS MISSING THEN 'Y' ELSE IF DATE1 IS MISSING THEN 'N' ELSE IF DATE1A IS MISSING THEN 'N' ELSE IF DATE1 EQ DATE1A THEN 'Y' ELSE 'N'
CMP1/A1 = IF DATE1 IS MISSING THEN 'N' ELSE IF DATE1A IS MISSING THEN 'N' ELSE IF DATE1 EQ DATE1A THEN 'Y' ELSE 'N';
The first test made no sense in my case. It can't happen.
Posts: 29 | Location: Seattle Washington | Registered: July 08, 2009