Focal Point
Help with GETTOK

This topic can be found at:

August 12, 2004, 12:33 AM
Help with GETTOK

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


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



I only got "CUSPART=NMP 437L4"

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

Any idea?

August 12, 2004, 06:13 AM
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.
Originally posted by Thiru:
-SET &MYPARAM = GETTOK(&PARAMS, 42, 2, ';',1000, 'MYPARAM');
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
Thanks Roland!

That worked well.