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     Remove trailing spaces from GETTOK

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Remove trailing spaces from GETTOK
 Login/Join
 
<kvn>
posted
I've tried STRIP, TRIM, and SQUEEZ to rid of the trailing spacings. I even tried using 'A0' as the output type. When I output the length of the first token I keep getting length of 17. I'm trying to get the length of each token. Any hints on accomplishing this task.




-DEFAULT &tmplst = '1324# 5678A# 9101# 1121BC#';

-SET &tokval=GETTOK(&tmplst, &tmplst.LENGTH, 1, '#', 1, A0);

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Expert
posted Hide Post
there aren't any trailing spaces in your example.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Pietro De Santis>
posted
Try this:

-DEFAULT &TMPLST = '1324# 5678A# 9101# 1121BC#';
-SET &TOKVAL = GETTOK(&TMPLST, &TMPLST.LENGTH, 1, '#', &TMPLST.LENGTH, 'A.&TMPLST.LENGTH');
-TYPE X &TOKVAL X &TOKVAL.LENGTH

-SET &TOKVAL2 = TRIMV('B', &TOKVAL, &TOKVAL.LENGTH, ' ', 1, 'A99V');
-TYPE X &TOKVAL2 X &TOKVAL2.LENGTH
 
Report This Post
<kvn>
posted
Thanks Pietro De Santis. Worked great. I tried using TRIMV before but with no luck. What does 'A99V' mean?
 
Report This Post
<Pietro De Santis>
posted
I didn't even know TRIMV existed. It's quite interesting.

In the Using Functions manual, there's a chapter called "Character Functions for AnV Fields".

A99V appears to be be a database field that is variable length, with a maximum length of 99. What's really interesting is this format can be used in a Dialog Manager function call.

This allows the TRIMV command to actually trim the DM variable. The regular TRIM command requires a field length as the last piece of the function string, thus nullifying what it's used for, if you're trimming spaces.
 
Report 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     Remove trailing spaces from GETTOK

Copyright © 1996-2020 Information Builders