Date: Fri, 19 May 2006 11:10:53 +0100
Reply-To: "Antro, Mark" <mantro@SPSS.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Antro, Mark" <mantro@SPSS.COM>
Subject: Re: Including Macro String Variables to define other Macro String
Content-Type: text/plain; charset="US-ASCII"
>I guess I'm getting tired, and possibly stupid - maybe time to quit for the day.
>This is a suggestion, without testing.
Neither, code works for me...
Define !Frank () "Hello" !Enddefine.
Define !Filename () !EVAL(!Frank) + "SomeOtherThing.sav". !ENDDEFINE.
Save out = "C:\Temp\" + !Filename.
As an alternative, have you thought about the production facility? This would mean the user never even sees SPSS, but allows them to enter custom values, such as a file name...
Start of Production File code:
SET MXCELLS=AUTOMATIC .
INSERT FILE='c:\temp\prod.sps' SYNTAX=BATCH ERROR=STOP.
*Output Folder: C:\Program Files\SPSS14.
*Exported Chart Format: Windows Metafile.
*Exported File Format: 0.
*Export Objects: 3.
*Output Type: 0.
*Print output on completion: Off.
* @myname | Name for file? | | Yes|.
*End Macro Symbols.
*PublishToWeb Cfg GUID: .
*PublishToWeb Objects: 6.
*PublishToWeb Table: 1.
*PublishToWeb UsrID: .
*PublishToWeb Authentication: .
This refers to the prod.sps file, which is a standard syntax file, which here was simply...
GET FILE = "c:\temp\agg2.sav".
DATASET NAME agg.
*Analysis stuff here.
Save out = "C:\Temp\" + @myname + "some.sav".