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     Error in Tokenizing.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Error in Tokenizing.
 Login/Join
 
<Navin>
posted
Hi

In the following code i am trying to break the whole &addl_alc in to &F array using "," as the delimiter.

The problem i face here is , if the total length exceeds 137 then i am getting "Session LOST" error.Else everything goes fine.

---CODE SNIPPET---

-DEFAULT &addl_alc = 'a,ABCNUMBER OF DEPENDENTS,PRIOR INV EXP MUTUAL FUNDS,PRIOR INV EXP STOCKS,PRIOR INV EXP VL/ANNUITIES,PROPOSAL REFERENCE ID,RISK TOLERANCE';

-SET &CNTR = 1;
-SET &CNTRR = 15;

-SET &TL = &addl_alc.LENGTH;

-TYPE --ASSIGNED VALUES START--
-TYPE &TL;
-TYPE &addl_alc;
-TYPE --ASSIGNED VALUES END--

-SET &F = '';

-ADDL_STRT

-IF (&CNTR LT &CNTRR) THEN ADDL_TRUN ELSE FINADDL_T;

-ADDL_TRUN

-SET &F.&CNTR = GETTOK('&addl_alc.EVAL',&TL,&CNTR,',',&TL,'A&TL.EVAL');

-TYPE --ARRAYINDEX AND ARRAYVALUE--
-TYPE **&CNTR**
-TYPE &F.&CNTR;
-TYPE --END--

-IF 'A' || &F.&CNTR EQ 'A' THEN FINADDL_T;
-SET &CNTR = &CNTR + 1;

-GOTO ADDL_STRT

-FINADDL_T



-----------

The above code is good. But if i add a single character to the &addl_alc variable (if the total length exceeds 137) then i am getting an error "SESSION LOST" . . Can anyone help me in figuring out this issue.
 
Report This Post
Expert
posted Hide Post
Naveen,

Firstly there is no requirement to terminate a DEFAULT with a semi colon. Remove the semi colon at the end of your DEFAULT and all will work comfortably upto 145 chars - should work with more but that's all I tested.

I would also use a -REPEAT loop in preference over the collection of GOTOs that you have but each to their own.

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
TONY

Thanks for your reply .

But the semicolon removal doesnot help at all . .

for example , If you run this code in the webfocus console and test , i am sure that it will throw you the "SESSION LOST" error.


-DEFAULT &addl_alc = 'a,ABCaNUMBER OF DEPENDENTS,PRIOR INV EXP MUTUAL FUNDS,PRIOR INV EXP STOCKS,PRIOR INV EXP VL/ANNUITIES,PROPOSAL REFERENCE ID,RISK TOLERANCE'

-SET &CNTR = 1;
-SET &CNTRR = 15;

-SET &TL = &addl_alc.LENGTH;

-SET &F.&CNTR = GETTOK('&addl_alc.EVAL',&TL,&CNTR,',',&TL,'A&TL.EVAL');
 
Report This Post
Virtuoso
posted Hide Post
Navin

Replace:
-SET &F.&CNTR = GETTOK('&addl_alc.EVAL',&TL,&CNTR,',',&TL,'A&TL.EVAL');

with
-SET &F.&CNTR = GETTOK(&addl_alc,&TL,&CNTR,',',&TL,'A&TL.EVAL');

removing the quotes and .EVAL from the input string.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
<Navin>
posted
Thanks Alan

That works fine.

Any Idea why that fails with in that 137 length of the input string.

That will be of great help in understanding.
 
Report This Post
Virtuoso
posted Hide Post
Must be something to do with supplying a string in quotes, as opposed to supplying a variable to the function. Not sure why.

Also change
-IF 'A' || &F.&CNTR EQ 'A' THEN FINADDL_T;
and
-IF (&CNTR LT &CNTRR) THEN ADDL_TRUN ELSE FINADDL_T;
to
-IF 'A' || &F.&CNTR EQ 'A' THEN GOTO FINADDL_T;
and
-IF (&CNTR LT &CNTRR) THEN GOTO ADDL_TRUN ELSE GOTO FINADDL_T;
otherwise the code will not branch as you expect.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
<Navin>
posted
Thanks
Alan.
 
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     Error in Tokenizing.

Copyright © 1996-2020 Information Builders