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
getting substring
 Login/Join
 
Platinum Member
posted
In dialog manager, I'm trying to trim the spaces from the end of a string. I tried TRIM, but of course WF expects me to know the length of the result string. So I tried ARGLEN to get it. I don't quite have it. Any help?

-SET &MSG = 'Here I am ';
-SET &LEN = ARGLEN(30, &MSG, 'I2');
-SET &MSG2 = SUBSTR(30, &MSG, 1, &LEN, &LEN, 'A&LEN');
-TYPE '&MSG2'

On a side note, why can't WF figure out how many chars I'm returning if I provide the start/end position? And why must I know how many characters will be returned? *geez*

Thanks in advance
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
-SET &ME = GETUSER('A8');
-SET &AL = ARGLEN( &ME.LENGTH , &ME, 'I2' );
-TYPE results of getuser function is &ME length is &ME.LENGTH Arglen=&AL

The .LENGTH operator will measure trailing blanks. And it works fine as the input to the ARGLEN function.

And update the Signature block inyour profile, so we know what product/release/system you're on.

This message has been edited. Last edited by: susannah,




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
good to know about the .LENGTH feature, but I am able to get the length using ARGLEN, b/c I do know the incoming string length. what I'm trying to do is somehow dynamically concatenate the 'A' with the length to format the result. I know there's a way to do it, but apparently the 'A&LEN' doesn't quite do it. (sorry, I had "signature" unchecked)


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
Yep, that's what I had been looking for. Thanks Tom Guru.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Guru
posted Hide Post
quote:
On a side note, why can't WF figure out how many chars I'm returning if I provide the start/end position? And why must I know how many characters will be returned? *geez*


Some functions like EDIT are part of the FOCUS/WebFOCUS language. Historically, the other functions were known as User Written Subroutines, because that's exactly what they are. They were provided by the FOCUS user community and, therefore, were designed by many different people. That's why you'll see many inconsistencies in the arguments required for the subroutines. My functions manual is always at hand because I don't try to remember the syntax of the different routines.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Master
posted Hide Post
Because the format is in quotes you have to force it to evaluate the variable.

-SET &MSG2 = SUBSTR(30, &MSG, 1, &LEN, &LEN, 'A&LEN.EVAL');


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders