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 screening an alphanumeric feed from another environment and building a Master file for use in WebFocus. Currently, for a particular set of fields, after a GETTOK, ATODBL is turning Null values into zeros. These Null values are valid and need to be preserved as they require representaion in the environment. Is there anyway to represent Nulls along with zeros?This message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.1.0 Excel, PDF, HTML
Posts: 6 | Location: Mount Laurel, NJ | Registered: March 14, 2013
A huge alphanumeric string of data is the feed for creation of the Master. The data: zeros, values greater than zero, and Nulls, are in the string and GETTOK retrieves. So a blank at the designated spot in the string denotes a null value for that particular instance of the field to be built.
The issue is that I do not see a way to preserve the Null value since fucntions will interpet a blank into a zero when creating a numeric field format.
My current workaround is to create a display version of the field in alphanumeric and a numeric version for calculations. I would set the Nulls for the numeric version to a value the users deem never to occur otherwise and code around that in production.
WebFOCUS 7.6.1.0 Excel, PDF, HTML
Posts: 6 | Location: Mount Laurel, NJ | Registered: March 14, 2013
You shouldn't have to create 2 different fields. It seems to me that this is just a situation of identifying what value constitutes your null value. Instead of Checking for a null value, since you are reading from a text file, you may need to check for a space or blank and then assign to null. Also you might need to set your SET NODATA to a value other then 0.
SET NODATA = .
Something like that.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Yes that is what I am checking for; a blank, then I want to assign to null. Will numeric formats hold a .? I tried the Set NODATA = . but it seems any conversion of alpha to numeric flips a null or . or space to zero.
WebFOCUS 7.6.1.0 Excel, PDF, HTML
Posts: 6 | Location: Mount Laurel, NJ | Registered: March 14, 2013
Numeric fields will hold Null/Missing values but you need to declare them with MISSING ON. Back to what Eric was saying. If the result of your GETTOK is blank then assign it to MISSING else the value of the GETTOK.
TABLE FILE CAR
PRINT
COMPUTE INPUT_STRING/A50 = '0.785445,,45.444,0.000,5.654,4585.58';
COMPUTE FLD_1/A50 MISSING ON = IF GETTOK(INPUT_STRING, 50, 1, ',', 50, FLD_1) EQ ' ' THEN MISSING ELSE GETTOK(INPUT_STRING, 50, 1, ',', 50, FLD_1);
COMPUTE FLD_2/A50 MISSING ON = IF GETTOK(INPUT_STRING, 50, 2, ',', 50, FLD_2) EQ ' ' THEN MISSING ELSE GETTOK(INPUT_STRING, 50, 2, ',', 50, FLD_2);
COMPUTE FLD_3/A50 MISSING ON = IF GETTOK(INPUT_STRING, 50, 3, ',', 50, FLD_3) EQ ' ' THEN MISSING ELSE GETTOK(INPUT_STRING, 50, 3, ',', 50, FLD_3);
COMPUTE FLD_4/A50 MISSING ON = IF GETTOK(INPUT_STRING, 50, 4, ',', 50, FLD_4) EQ ' ' THEN MISSING ELSE GETTOK(INPUT_STRING, 50, 4, ',', 50, FLD_4);
COMPUTE FLD_5/A50 MISSING ON = IF GETTOK(INPUT_STRING, 50, 5, ',', 50, FLD_5) EQ ' ' THEN MISSING ELSE GETTOK(INPUT_STRING, 50, 5, ',', 50, FLD_5);
COMPUTE FLD_6/A50 MISSING ON = IF GETTOK(INPUT_STRING, 50, 6, ',', 50, FLD_6) EQ ' ' THEN MISSING ELSE GETTOK(INPUT_STRING, 50, 6, ',', 50, FLD_6);
COMPUTE DBL_1/D20.12 MISSING ON = ATODBL(FLD_1, '15', DBL_1);
COMPUTE DBL_2/D20.12 MISSING ON = ATODBL(FLD_2, '15', DBL_2);
COMPUTE DBL_3/D20.12 MISSING ON = ATODBL(FLD_3, '15', DBL_3);
COMPUTE DBL_4/D20.12 MISSING ON = ATODBL(FLD_4, '15', DBL_4);
COMPUTE DBL_5/D20.12 MISSING ON = ATODBL(FLD_5, '15', DBL_5);
COMPUTE DBL_6/D20.12 MISSING ON = ATODBL(FLD_5, '15', DBL_6);
BY COUNTRY
BY CAR
ON TABLE SET NODATA 'No Data'
ON TABLE SET CENT-ZERO ON
END
-RUN
That is exactly what I was saying. Much better put by you. Also the SET NODATA is a max. It doesn't actually change the table but rather tells WebFOCUS how to display a null value on the screen when it comes across it.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
So in the resulting Master File, with the use of MISSING=ON, the Null value of the field will display as '.', (as it was designated in my test) within the environment, unless otherwise set.
(Such as SET NODATA = NULL or SET NODATA = BLANK)
Correct?
In other words, there will be no need to stipulate how the Null field displays after the build of the Master as long as End-Users are fine with '.'.
Posts: 6 | Location: Mount Laurel, NJ | Registered: March 14, 2013