Page 1 of 1

Converting a substitution value to a string variable

Posted: Sat Jan 22, 2011 7:17 pm
by Susan Smith
Hi all,

Is there a way to load the value of a substitution value into a regular string variable? In my menu program, I do this:

00100 EXECUTE "CONFIG SUBSTITUTE [USERCODE] "&USERNO$

So, STATUS SUBS returns
[USERCODE] 45 (or some other two-digit code)

[USERCODE] is used all over my system and in a few cases, I need to write it to a data file. How can I get its value into a string? Do I have to parse the STATUS SUBS results? (Please tell me no...)

-- Susan

Posted: Sat Jan 22, 2011 7:34 pm
by Susan Smith
Nevermind. I think the easiest thing to do is that in the same program in which I do the CONFIG SUBSTITUTE [USERCODE] command, I should also set an ENV$ variable called USERCODE. Then I have the best of both worlds. (I think.)