Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
Help with GETTOK
 Login/Join
 
<Thiru>
posted
Hi,

I have these three lines code and not able to get my desired output.

-SET &PARAMS = 'START=END;CUSPART=NMP 437L429;RPTFMT=HTML;';

-SET &MYPARAM = GETTOK(&PARAMS, 42, 2, ';',1000, 'MYPARAM');

-TYPE &MYPARAM

-EXIT

I only got "CUSPART=NMP 437L4"

I need to get "CUSPART=NMP 437L429' (between the second and third ; seperator)

Any idea?

--Thiru
 
Reply With QuoteReport This Post
Gold member
posted Hide Post
What I see first is, that you are working in Dialog Manager. There you usually have to specify the format of the return value and not the target variable name. MAYBE this is the reason for your problem.
quote:
Originally posted by Thiru:
[qb]
-SET &MYPARAM = GETTOK(&PARAMS, 42, 2, ';',1000, 'MYPARAM');
[/qb]
So the above should be something like this:
-SET &MYPARAM = GETTOK(&PARAMS, 42, 2, ';',42, 'A42');
I took 42 instead of 1000 because this is the maximum possible size of one token. It cannot exceed the length of the whole string.
 
Posts: 54 | Location: Switzerland | Registered: May 13, 2003Reply With QuoteReport This Post
<Thiru>
posted
Thanks Roland!

That worked well.
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.