Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
function question
 Login/Join
 
Platinum Member
posted
I'm trying to take out trailing blanks using the squeez function, but as an argument of that function you have to specify the number of bytes of the new variable. So, if my number of bytes is longer than the actual text I want out of my original variable, isn't the new variable just going to be padded with trailing spaces? What is the point of this function?


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Master
posted Hide Post
One use I found was, in one of my client they need the data to be displayed as

text:value

In database, this data has a format like

text:         value

Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Virtuoso
posted Hide Post
It's useful in dialog manager, where you can change a variable's length (and specify it dynamically in the call's final argument using .EVAL).


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
<JG>
posted
Mark1 squeez is not for removing trailing blanks it's for converting multiple blanks to a single blank.
YOU need the trim function
 
Report This Post
Expert
posted Hide Post
and, continuing on from JG, you can use the ARGLEN function to determine how long the resulting field needs to be
and put that number into your TRIM function, if you like.
Are you in DM or in a Define?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
But the Trim function requires a number of bytes for the output variable also. Therefore, I would have the same problem. And I understand about the ARGLEN function as an argument of the Trim function, but wouldn't that just use the longest text value of that field as the variable length? Therefore, anything shorter would have trailing spaces.

My overall objective is to export a text file out of Webfocus using ON TABLE HOLD AS PCMHDET FORMAT COMT. When I do that, most of the fields are exactly as they should be: If there is a value in a field shorter than another value in that same field, then they look like this:

VARIABLE1
"ABCDEFGHE"
"ABC"

But there is one field that is not coming over correctly. I define it as A50 in my program. It comes over with the ending quotes way off to the right, in other words, with trailing spaces.

Now there are other defined fields as A50, that come out just fine on the text file without those trailing spaces.

Thank you for your help!


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Expert
posted Hide Post
Thats why i asked if you were in DM or in a DEFINE. Its easy to handle the output format change...just tell me which environment you're in, and i'll show you how.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Mark1,

Have you tried using a variable length field e.g. A50V to see if that helps?

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, 2004Report This Post
Platinum Member
posted Hide Post
I'm in DM.

One more thing while I'm here:

Can you do a "NOT IN..." statement in webfocus? I've got this:

LASTNAME/A50 = IF TOKENFOUR NOT IN ('JR', 'SR', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VIII', ' ') THEN TOKENFOUR ELSE TOKENTHREE;

and it gives me the error that I should use IN in a valid clause. What's the deal with that?

If I just say IN ('.... its fine.


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Expert
posted Hide Post
Mark,

In answer to your last question, (I'll leave Susannah to reply to your first one Smiler) try -

LASTNAME/A50 = IF NOT (TOKENFOUR IN ('JR', 'SR', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VIII', ' '))
 THEN TOKENFOUR ELSE TOKENTHREE;


Or reverse it to give the true result first -

LASTNAME/A50 = IF TOKENFOUR IN ('JR', 'SR', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VIII', ' ')
 THEN TOKENTHREE ELSE TOKENFOUR;


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, 2004Report This Post
Platinum Member
posted Hide Post
Thank you Tony A.! You don't know how much headache that saves me!


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders