I'm not certain of what you're trying to achieve here. If you intend
to have your output command write out the symbol XYZ, use the "&"
symbol substitution operator:
$ xyz="hello"
$ a="XYZ" ! Warning - CASE SENSITIVE!
$ write sys$output &a
hello
As your code is written, symbol A is being substituted, leading to
'XYZ' which is also being substituted (as a blank) hence the prompt for
an expression to output.
$ a="'"+"XYZ"+"'"
$ xyz="hello"
$ hello="is this a surprise?"
$ write sys$output 'a'
is this a surprise?
If this isn't what you want to do, please explain what you're expecting
your WRITE command to output.