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 concatenating some fields from an Oracle table together to create a new field. Some of the fields are missing. When the field is missing a value it's converting it to a single blank.
FIELDA = 'ABC' FIELDB = 'DEF' FIELDC = is missing a value FIELDD = 'GHI' NEW_FIELD = FIELDA | FIELDB | FIELDC | FIELDD ;
The result for NEW_FEILD is 'ABCDEF GHI' I need to have it 'ABCDEFGHI'. I want to find out how other developers have handled this.
Thanks loads, Jim
Posts: 43 | Location: San Jose, California. | Registered: July 18, 2005
Check Your Master File Description (MFD) to make sure each field has the MISSING=ON attribute. If this is set to OFF or is not there then FOCUS will always substitute a blank or 0 for a null value. The MISSING=ON will force FOCUS to retain the null value and your DEFINE should work. I ran a test with a file using WF 7.1.1 and it worked. No space inbetween values.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Susannah's suggestion will work if you code it this way:
FIELDA || (FIELDB || (FIELDC || FIELDD))
The parenthesis are very important to make FOCUS perform the concatenation from right to left. I have had problems with this type of concatenation (trailing blanks still appear) when parenthesis were not used.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
That's puzzling. I would expect ((FIELDA || FIELDB) || FIELDC) || FIELDD and FIELDA || (FIELDB || (FIELDC || FIELDD)) to yield the same result.
In combining its two operands, || transfers the trailing spaces of the left operand to the tail end of the result, so no matter how you parenthesize all the field's trailing spaces wind up on the extreme right.
In a word, isn't Hard Catenation associative?
Of course, the parentheses do matter when the expression combines hard and soft catenation.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Sorry I took so long to reply back to my post. I really appreciate everyone’s feedback. I read everyone’s feed back and this is what I have.
I checked our Master for this table and MISSING=ON is set for ever field. Nulls are still returning a blank. We are on 533. Don't know if that makes a difference. We're in the process of upgrading to 711 and I will check this again once we upgrade.
The problem with the hard concatenation is that the contents of some of the fields may contain 2 bytes and a blank. The other developer wants the blank there in that case. FIELDB may contain 'DE ' and the developer wants: "ABCDE FGHI"
The only time the developer wants no blanks is if the entire field is a null.
Thanks for the STRIP Subroutine. That will be very helpful in some other applications.
I wrote a routine to check for missing values and have it working.
Posts: 43 | Location: San Jose, California. | Registered: July 18, 2005