Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Substring of a variable

Status
Not open for further replies.

kaeserea

Programmer
Feb 26, 2003
164
0
0
DE
Hello!

Does anybody know how to get a substring out of a variable and store this substring in another variable?

I tried
[tt]
-SET &WF = 'blubb';
-SET &ST = SUBSTR(5, &WF, 2, 2, 1, &ST);
[/tt]

But this does not work. I guess this is due to the fact that SUBSTR is used with COMPUTE and DEFINE normally.

Eva
 
Hello Eva,

Try this:
-SET &WF = 'blubb';
-SET &ST = '?';
-SET &ST = SUBSTR(5, &WF, 2, 2, 1, &ST);

Hope this Helps
Grzegorz
 
The doc states that the last arg, when used in Dialogue Manager MUST be the FORMAT of the returned value. Code it like this:

-SET &WF = 'blubb';
-SET &ST = SUBSTR(5, &WF, 2, 2, 1, 'A1');

and it works like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top