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 have one numeric data source that is stated in a master synomyn (was not produced by me) at Actual: D8 Usage: D20.2 format and another that is in Actual:P10 Usage:P20.4 format. I am trying to reconcile these two data sources to report the ones that didnt match through the Match command. What is the best way to coordinate these two data sources formats so they will successfully Match Proccess.
I have tried various formats but have issues where the program says that the two records dont match and they look exactly like each other. Especially the two fields I mention above.
Are there any issues that may contribute for this to behave like this? Any help?
DanThis message has been edited. Last edited by: moyer1dl,
In my experience matching is best done using alpha fields as the matching fields. I agree with JG that you should convert the fields to the same format, but I'd make them alpha (using ftoa or ptoa where appropriate) by means of a define and then do the match on the alpha fields.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
If you run the following, you can get an idea what happens when you convert from D to P at different times in the flow of the fex. I agree with JG that trying to match on D fields is hazardous. Matching on A or P fields works but you have to be sure when you convert from D.
DEFINE FILE CAR
D2RCOST/D9.2=RCOST/3.1416;
P2RCOST/P9.2=RCOST/3.1416;
END
TABLE FILE CAR
SUM RCOST D2RCOST P2RCOST COMPUTE DPRCOST/P9.2=D2RCOST;
BY COUNTRY
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, 2006
Sure, look up the user functions FTOA and PTOA. If you also have devstudio installed somewhere, it comes with the help file called function.chm. This contains all descriptions of all user written functions.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
As JG mentioned above you really have to undertsand the precision at which the data is stored. If you take two values of, say, 9.95 in either format then you could have 9.9499 in the D12.2 format and converting this to alpha is not going to match against the 9.95 from the P12.2 format.
You need to do some samples from your actual data and then determine the approach required. If I had the two values above I'd probably round the D12.2 value by multiplying by 100, taking the integer and then dividing by 100 placing the result in a P12.2. The match should work OK then.
Best approach? Look at your data first.
Oh, A14 and A15 formats might not match either
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Be aware that the D format, ie Double precision floating point, contains separator characters - commas for those of us on the west side of the pond and periods for those on Tony's side. The P format, ie packed decimal, does not. This may affect the matching process.
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
Posts: 252 | Location: USA | Registered: April 15, 2003
Ok when I use the FTOA in the Intial formating of the one data source I lose records in one to many relationships. For example I get one amount for an account when I should get two.
Do I need like a pre proccesor. I ran a little test to test the equality of values in the value would always say it was not equal but the other ones would be equal.
You should really convert both numbers to P22.4 and then match. If you have problems, print out detail data for the non-matches, with the D format with a higher precision (e.g. D18.6). You are on a very old release- on a later release you could have used D28.8 to display a more precise double value.
There is no need to use FTOA or PTOA: they simply convert to packed internally anyway to display the number.
Again, convert to P22.4 and investigate problem matches.
Part of the problem I am having is the record seems to match on this field even though the amounts are different. It is as if it is not condsidering this field.
Here is the output after trying Edwards reccomendation. They look like they right justify, I dont know. (I used OLD-or-new to get somthing to print out)
DEFINE FILE CHSHLD3
-*TRXBALANCE2/A26 = PTOA(TRXBALANCE, '(P12.2C)', TRXBALANCE2);
TRXBALANCE2/P22.4=TRXBALANCE;
END
DEFINE FILE LRPMHLD
-*OUTSTANDRESERVE2/A15 = FTOA(OUTSTANDRESERVE, '(D12.2)', OUTSTANDRESERVE2)
OUTSTANDRESERVE2/P22.4=OUTSTANDRESERVE;
END
MATCH FILE LRPMHLD
BY CLAIMNUMBER2
BY COVERAGE2
BY OUTSTANDRESERVE2
RUN
FILE CHSHLD3
PRINT
CLMLOSSDATE
CLMOPENDATE
CLMCLOSEDATE
CLMLASTACTIVITYDATE
POLDISPLAYPOLICY
BY CLAIMNUMBER2
BY COVERAGE2
BY TRXBALANCE2
AFTER MATCH HOLD NEW-NOT-OLD
END
TABLE FILE HOLD
PRINT
CLAIMNUMBER2 AS 'CLAIM #'
COVERAGE2 AS 'COVERAGE'
OUTSTANDRESERVE2 AS 'OUTSTANDING,RESERVE'
CLMLOSSDATE AS 'CLAIM,LOSS,DATE'
CLMOPENDATE AS 'CLAIM,SETUP,DATE'
CLMCLOSEDATE AS 'CLAIM,CLOSE,DATE'
CLMLASTACTIVITYDATE AS 'CLM LAST,ACTIVITY,DATE'
POLDISPLAYPOLICY AS 'POLICY #'
HEADING
The biggest thing that is confusing me is the data sources are both SQL. The one synomyn for one of the Data Source generated the field into this P21.4. Is this normal?
I think at least when I view either of these data sources through MS Access they are using auto double.This message has been edited. Last edited by: moyer1dl,
All SQL sources have specific rules about how the WebFocus adapter maps numerics and they are usually related to the precision of the declared column in the DBMS.
If you are getting different formats between two tables in WebFocus it is because they are declared differently in the tables.
You can find the rules for a particular adapter by going to the WebFocus server console and checking the online adapter help.
If the have the same SQL format try changing the masters so that they have the same ACTUAL and USAGE, preferably P and do your match using that.
You may need to get the DBA to adjust the tables so that they have the same precision.
Alternatively, keep the OLD-OR-NEW and then, beacuse you have to hold the data from a MATCH anyway, just output the rows where the difference is zero or within any bounds you might have to work to.
In one of your posts you mention a one to many relationship and only getting one value when you should have two. I therefore assume that you are performing a SUM operation? If so you will need to do any conversion to alpha for comparison after the summation and not before.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
In the first match, you only have 3 BY's. That means that under the covers a SUM is performed because that is the default verb. The second match has some PRINT fields, and also 3 BY's. My guess is that these three BY's should be the matching fields. If that is indeed the case, then all BY's must have the same format and the same name. So, CLAIMNUMBER2 and COVERAGE2 and OUTSTANDRESERVE2 in the first MATCH should have exactly the same format as CLAIMNUMBER2 and COVERAGE2 and TRXBALANCE2 in the second MATCH. But, the third field in both MATCHes must also have the same name for the MATCH to be performed correctly. You can do that by simply specifying BY TRXBALANCE2 AS OUTSTANDRESERVE2 in your second MATCH. Or of course BY OUTSTANDRESERVE2 AS AMOUNT in the first MATCH and BY TRXBALANCE2 AS AMOUNT in the second. The hold file will then contain a field called AMOUNT.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Ok I think Gamp and Edwards solutions worked but now when I go to edit that amount field in the report I get and "uncorrectable syntax error". I want to push it down to two decimal places.
If you took Edwards solution to match on P22.4 format, then you would only need to say AMOUNT/P12.2. If you converted to A, then in your final report you would need to convert it back to D or P again to be able to do calculations on it or redefine the display format.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007