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'm doing a JOIN and have several columns showing '.' for the missing data values. If I set NODATA, then all of the missing values become that value. I need one of the columns to show blanks and others show '0'. I know I can do it with HOLDing the data first and then manipulating the MISSING, but I was wandering if there is a technique to do it in one pass, without the HOLD.
The problem you have, I believe, is that internally, before output, these 'missing' values are actually treated as blank or zero. It is differentiating between a real blank or zero and a 'missing' field treated as blank or zero.
If a field could never be blank or zero, then you can test it against blank or zero in a COMPUTE and put in the value you want.
Does that make sense?
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
The thing is, Alan, there are no missing values in the original databases. It is after the JOIN, because I'm using SET ALL = ON, that the missing values appear. I tried re-DEFINE-ing with IF against MISSING, but that did not work.
Internally WF is treating the values as either blank or zero. Missing is not an option, the values are not MISSING as such, just 'not there', and you can only check against a blank for alpha or zero for numeric for these 'not there' values.
Problem comes when values are really blank or zero as opposed to not there, which causes the major issue.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I can't really tell from your code what the formats of your fields are, but you don't have any format specified in the above code. Assuming FIELD1 IS numeric, try this:
DEFINE FILE filename FIELD2/D12=IF FIELD1 EQ MISSING THEN 0 ELSE FIELD1; FIELD3/D12S=IF FIELD1 EQ MISSING THEN 0 ELSE FIELD1; END
If there is no joined-to value for field1, field2 should show up as 0, field3 should show up as blank (zero-supressed).
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
The problem you correctly identified. I think we just didn't go far enough. If you move these to a COMPUTE (post internal matrix) it will work. Here's an example:
JOIN EMPDATA.PIN IN EMPDATA TO ALL TRAINING.PIN IN TRAIN2 AS JOIN1 SET ALL=PASS TABLE FILE EMPDATA PRINT LASTNAME AND FIRSTNAME AND COURSECODE AND EXPENSES COMPUTE FIELD2/D12=IF EXPENSES EQ MISSING THEN 0 ELSE EXPENSES; COMPUTE FIELD3/D12S=IF EXPENSES EQ MISSING THEN 0 ELSE EXPENSES; BY PIN WHERE EXPENSES GT 3000 END
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007