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 remove the last charater of the variable?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
how to remove the last charater of the variable?
 Login/Join
 
Platinum Member
posted
Hi

My variable ends with , character i want to remove that one and then show it in the report

Example :1. All ,
2. A1,A2,
3.A1,A2,A3,
Mu output should be like that

1.All
2.A1,A2
3.A1,A2,A3

Please help me to solve the issue


Thanks
Gobinath Velusamy


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Do a search on STRIP


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
That will remove all instances.

To delete just the final non-blank character you can use ARGLEN (to determine its position) and SUBSTR.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
Hi

I cant determine the length ... i t will vary dynamically


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Are these dialog manager & variables, or Focus fields? If the latter, are they fixed or variable in length?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
There is a REVERSE subroutine. You can flip the contents, check to see if the firt character is a comma, remove it, then flip it back.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Gold member
posted Hide Post
Hi Gopinath,
Can you try this below?

-SET &TEST = 'All,1,2,3,';
-SET &TEST1 = SUBSTR(&TEST.LENGTH, &TEST, 1, &TEST.LENGTH-1, &TEST.LENGTH-1, 'A&TEST.LENGTH');
-TYPE &TEST1


Regards,
Kasi Krishnan
WF 7.1.4 & WF 7.6.9: Databases - DB2, SQL Server 2000.
OS: Windows & AIX
 
Posts: 71 | Registered: November 20, 2003Report This Post
Virtuoso
posted Hide Post
Gobinath,

I think you can use TRIM:
  
-* File strip1.fex
-SET &ST='A1,A2,A34,';
-SET &STL=&ST.LENGTH;
-SET &STM=TRIM('T','&ST.EVAL',&STL,',',1,'A&STL.EVAL');
-TYPE &ST : &STM

However, if the ',' is not the last character in your string and you have trailing blanks, then you should also r-justify your string:
  
-SET &ST='A1,A22,A3425,    ';
-SET &STL=&ST.LENGTH;
-SET &STM=LJUST(&STL, TRIM('T',RJUST(&STL,'&ST.EVAL','A&STL.EVAL'),&STL,',',1,'A&STL.EVAL'),'A&STL.EVAL');
-TYPE &ST : &STM

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 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 remove the last charater of the variable?

Copyright © 1996-2020 Information Builders