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');
I only got "CUSPART=NMP 437L4"
I need to get "CUSPART=NMP 437L429' (between the second and third ; seperator)
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.
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.
That worked well.
|Powered by Social Strata|