1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
* Quote string on the fly.SPS.

* Often need to use defined macro variables in TITLES of charts, Pivot Tables etc.
* It is more convenient when we can do this outside of a macro.
* Example.
DEFINE !client() ABC Inc !ENDDEFINE.
DEFINE !fiscalYear() 2005 !ENDDEFINE.
DEFINE !quotestr (!POS=!ENCLOSE( '[', ']' ) ) !QUOTE(!1) !ENDDEFINE.

TITLE !quotestr [ Results for !client (Fiscal Year !fiscalYear )].
* TITLE line contains:
* Results for ABC Inc (Fiscal Year 2005).