If it is a simple value you want you can simply do:
OUTPUT=`pro -b -p a.r`;echo $OUTPUT
where a.r is a procedure like:
message "a".
quit.
This simply assigns the stdout of the progress session to the environment variable OUTPUT, etc..
If you need multiple values to export, you can parse them after the fact, or, just write to a file as you first suggested.
Warren.