save outfile with two macro parameters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

save outfile with two macro parameters

Luca Meyer
I am trying to run:

SAVE OUTFILE !TEMP+"MN"+!VERSION+".SAV".

but i get:

>Warning # 207 in column 14.  Text: D:\TEMP\MN
>A '+' was found following a text string, indicating continuation, but the
>next non-blank character was not a quotation mark or an apostrophe.


>Error # 5303 in column 7.  Text: 01
>A symbol not allowed on the SAVE, XSAVE, or SAVE DIMENSIONS command has
>been encountered.  Check spelling and punctuation.
>This command not executed.

Here are the two parameters definition earlier on into the syntax:

DEFINE !VERSION() 01 !ENDDEFINE.
DEFINE !TEMP() "D:\TEMP\" !ENDDEFINE.

Any suggestion on how to solve this matter will be appreciated.

Luca
Reply | Threaded
Open this post in threaded view
|

Re: save outfile with two macro parameters

Raynald Levesque
Hi Luca,

The following works:


SET MPRINT=YES /PRINTBACK=YES.
DEFINE !VERSION() 01 !ENDDEFINE.
DEFINE !TEMP() "D:\TEMP\" !ENDDEFINE.


DEFINE !save(!POS=!TOKENS(1) /!POS=!TOKENS(1) /!POS=!TOKENS(1))
SAVE OUTFILE !1 + !QUOTE(!CONCAT(!2,!3,".SAV")).
!ENDDEFINE.

!save !temp MN !version.

Cheers!

Raynald Levesque [hidden email]
Website: www.spsstools.net


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Luca Meyer
Sent: March 24, 2007 12:49 PM
To: [hidden email]
Subject: save outfile with two macro parameters

I am trying to run:

SAVE OUTFILE !TEMP+"MN"+!VERSION+".SAV".

but i get:

>Warning # 207 in column 14.  Text: D:\TEMP\MN
>A '+' was found following a text string, indicating continuation, but the
>next non-blank character was not a quotation mark or an apostrophe.


>Error # 5303 in column 7.  Text: 01
>A symbol not allowed on the SAVE, XSAVE, or SAVE DIMENSIONS command has
>been encountered.  Check spelling and punctuation.
>This command not executed.

Here are the two parameters definition earlier on into the syntax:

DEFINE !VERSION() 01 !ENDDEFINE.
DEFINE !TEMP() "D:\TEMP\" !ENDDEFINE.

Any suggestion on how to solve this matter will be appreciated.

Luca