I guess I'm missing something but I still don't see why you would need macro substitution.
>Hi Sergey,
>I know that in THAT case I do not need macro substitution, but I used that just as an example. In reality, the value in getfield will change to a different field name and the wordhide program will pull the value from the correct field in the table
depending on the fieldname that is passed to it. So I need to use macro substitution so I can use
one variable name: getfield throughout a procedure and only change the field name ONCE and store it in the variable getfield.
>
>
>getfield='prof_sc'
>value1 = WORDHIDE(&getfield)
>?value1
>
>*wordhide function xstr param should = 'prof_sc' in this example only
>FUNCTION wordhide
>PARAMETERS xstr
>set step on
>? xstr
>IF LOWER(xstr)='prof_sc'
> RETURN 'mdr_dob'
>ELSE
> RETURN 'unknown - prof_sc was not passed to this program'
>ENDIF
>
--sb--