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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to Get the Exact data from the field: FOCUS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to Get the Exact data from the field: FOCUS
 Login/Join
 
<Raghuraman>
posted
Hi all
LNAME field length is 25. but the varibale contains only less then or equal 25.
What i want i need to eliminate the space

for example
temp=substr(25,LNAME,1,LENGTH(LNAME),LENGTH(LNAME),TEMP);

LENGTH is not correct statement. Just i put u can easy to understand.
 
Report This Post
Virtuoso
posted Hide Post
quote:
LNAME field length is 25. but the varibale contains only less then or equal 25.
What i want i need to eliminate the space


Are you trying to build a field eliminating spaces such as

FNAME LNAME - for example LEAH CROSS or do you have some other purpose.

If yes look into the concatenation characters '|' soft, versus '||' hard.

DEFINE FILE XXX
NAME/A51 = FNAME || ( ' ' | LNAME );
END

Would create a field with first and then last separated by a space.

(Assumes first and last are 25 each)

DEFINE FILE XXX
NAME/A51 = LNAME || ( ', ' | FNAME);
END

Would give Last then first separated by a comma.

Of course this may not be what you are wanting to do, but hope it helps.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
To convert multiple blanks between words to one blank in a text string, I use the SQUEEZ function:

CUST_NMX/A76 = SQUEEZ(76, CUST_NM, 'A76');


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
I believe the function you are looking for is LEN.
But you will have to give the new field name (temp) a format and the only logical format to give it is A25 so you can never eliminate the blanks on the end of the field.
Why would you want to anyway. I don't understand what you are trying to do.

The LEN function will tell the length of the field up to the first blank.
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to Get the Exact data from the field: FOCUS

Copyright © 1996-2020 Information Builders