Focal Point
Help with GETTOK

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9841097331

August 12, 2004, 12:33 AM
<Thiru>
Help with GETTOK
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
August 12, 2004, 06:13 AM
Roland
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.
August 12, 2004, 01:22 PM
<Thiru>
Thanks Roland!

That worked well.