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     [SOLVED] '.' and EVAL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] '.' and EVAL
 Login/Join
 
<Navin>
posted
Hi All

I am trying to tokenize &Temp using '.'

To say , since that &Temp is not having '.' in it , &Temp should not get tokenized when the following STRTOK is applied.

-SET &Temp = 'ABCD*E *TR &|FGH TR ABOUT TR';
-SET &TL = &Temp.LENGTH;
-SET &REP = '.';

-SET &MODSTR = GETTOK(&Temp,&TL,1,&REP,50, 'A50');
-SET &MODSTR = TRUNCATE(&MODSTR);

-TYPE &Temp;
-TYPE &MODSTR;


o/p

ABCD*E *TR &FGH TR ABOUT TR;
ABCD*E;

It gets corrected when STRTOK is rewritten as

-SET &MODSTR = GETTOK(&Temp,&TL,1,&REP.EVAL,50, 'A50');

I dont understand why , Can anyone help me out ? What is the significance of EVAL here ?

This message has been edited. Last edited by: Kerry,
 
Report This Post
Virtuoso
posted Hide Post
Navin,

Could be a specific thing for the 71 release that you're working with.
I tried your code in 76(2) and there it just gives me the correct output.
Maybe upgrade is in order?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
The .EVAL forces an evaluation of the variable string prior to the parsing of the DM statement that contains the variable.

No doubt J.G. will be along any moment with an IB explanation?

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
<Navin>
posted
Also,


-SET &REP = '-';

-IF (&REP EQ '.') THEN REPO ELSE NOREPO;
-REPO
-TYPE WORKS SUCCESSFULLY
-NOREPO

'-'(hiphen) and '+' equates to '.' in the above code. Others doesnot work obviously. Any idea why ?
 
Report This Post
Virtuoso
posted Hide Post
Dialog Manager attempts to treat comparisons as numeric-to-numeric. The values '.', '-', '+', '0', and ' ' are treated as representations of zero, and are therefore all 'equal'.

(I guess someone once authored validation/classification/parsing code to handle a potential number, and allowed for the digits, signs, decimal points and leading spaces. Once all the individual characters pass that test, evaluation of the "number" begins with zero and swallows the characters one at a time. Nothing happens to change the initial value, so zero it is....)

ASIS(&var) will force &var to be treated as a character string.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
<Navin>
posted
Thanks Gross
that worked.
 
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     [SOLVED] '.' and EVAL

Copyright © 1996-2020 Information Builders