You can use MPE/iX and UNIX environment variables in AskPlus by prefixing the variable name with the ^ character. When you reference an environment variable in AskPlus, the value of the variable is interpreted as though it had been entered with quotes. If this is not what you want, you must prefix the value of the variable with a > character. This character, which is part of the value, will cause AskPlus to treat the remainder of the value as though it had been entered without quotes.
On MPE systems, the SETVAR command is used to set environment variables. On UNIX, the command is export. UNIX environment variables must be exported before AskPlus is started.
See the following (MPE) example:
:SETVAR YMD (!HPYEAR * 10000 + !HPMONTH * 100 + !HPDATE )
:SETVAR OUTFILE ">FI!YMD"
:SHOWVAR
YMD = 950308
OUTFILE = >FI950308
FIND PRIMARY = ORDERS
ORDER-DATE = ^YMD
SAVE OUT = ^OUTFILE, SDASK
D1, ORDER-DATE, TAB1
...
END
ECHO ^YMD
"950308"
ECHO ^OUTFILE
FI950308