LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 1 Sep 2005 10:46:57 +0200
Reply-To:     lucameyer@tiscali.it
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Luca Meyer <lucameyer@tiscali.it>
Organization: Luca Meyer
Subject:      R: Passing a macro variable to a script
Comments: cc: Raynald@spsstools.net
In-Reply-To:  <DAEJJEJKGDKPDEDHOIELMEKOEJAA.rlevesque@videotron.ca>
Content-Type: text/plain; charset="iso-8859-1"

It works, thank you Raynald! Luca

> -----Messaggio originale----- > Da: Raynald Levesque [mailto:rlevesque@videotron.ca] > Inviato: giovedý 1 settembre 2005 3.22 > A: lucameyer@tiscali.it; SPSSX-L@LISTSERV.UGA.EDU > Oggetto: RE: Passing a macro variable to a script > > > Hi Luca > > Try this (untested) code: > > DEFINE !Macro1 (Parameter1=!TOKENS(1)). > GET FILE "C:\TEMP\TEMP.SAV". > SCRIPT "C:\TEMP\TEMP.SBS" (!QUOTE(!Parameter1)). > !ENDDEFINE > > HTH > > Raynald Levesque Raynald@spsstools.net > Visit my SPSS site: http://www.spsstools.net > > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On > Behalf Of Luca Meyer > Sent: August 31, 2005 10:46 AM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: Passing a macro variable to a script > > > Hi, > > Here I am trying to run something like: > > DEFINE !Macro1 (Parameter1=!TOKENS(1)). > GET FILE "C:\TEMP\TEMP.SAV". > SCRIPT "C:\TEMP\TEMP.SBS" ("!Parameter1"). > !ENDDEFINE > > !Macro1 Parameter1=Q300. > > That is, by using the temp.sbs script I am trying to rename > some variables by adding one prefix (in the specific case > Q300 but it could vary) to the name of the variable. > > The script produces the correct rename syntax (thanks Neila > for your suggestions!), but instead of the "Q300" value it > takes "!Parameter1", that is the parameter value is not sent > to the script...any suggestion on how I can correct the macro? > > Thanks, > Luca > > Mr. Luca MEYER > Survey research, data analysis & more: http://www.lucameyer.com/ > Tel: +390122854456 - Fax: +390122854837 - Mobile: + 393394950021 > > "If you can't feed a hundred people, then feed just one." - > Mother Teresa - www.thehungersite.com > > >


Back to: Top of message | Previous page | Main SPSSX-L page