quote( ) and unquote( )

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

quote( ) and unquote( )

Rich Ulrich
What is the underlying meaning, or what is done, by QUOTE( ) and
UNQUOTE( ) ?
Here is an example from documentation,
 http://www-01.ibm.com/support/docview.wss?uid=swg21476897
****from the doc
If you do not want to always type the root of the directory in the macro call such as 'C:\,' the following example shows you how to incorporate the root of the directory as part of the macro itself. In the example below, we only specify the subdirectory newfiles in the macro call rather than 'C:\newfiles'.

DEFINE FILESAVE (DIR !TOKENS(1)
/OUTFL !TOKENS(1)).
SAVE OUTFILE !CONCAT('"',!UNQUOTE("C:\"), !UNQUOTE(!DIR), !UNQUOTE("\"), !UNQUOTE (!OUTFL),'.SAV"').
!ENDDEFINE.

FILESAVE
DIR= newfiles OUTFL= employs

****end of example.

Above, there is a wordy "CONCAT".

It seems to me that some time, in SPSS or elsewhere, I have achieved
the desired result by using  outfile = "C:\" + DIR+"\" + OUTFIL + ".SAV"  .

Are these explained in the documentation, or is it simple enough to
explain here?

--
Rich Ulrich