defining variable set via syntax

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

defining variable set via syntax

wsu_wright
Is there a way to define variable sets by way of syntax?  The Utilities menu for the Define Variable Sets doesn't offer a paste function & couldn't find anything in the syntax reference guide beyond the Apply Dictionary command.

David

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: defining variable set via syntax

Peck, Jon
No, variable sets cannot be defined in syntax.  In fact, the backend/syntax processor doesn't even know they exist.  They are solely used by the frontend.
However, there is an extension command, SETSMACRO, that will create a macro from Variable Sets.  The help for it is below.  It works with v16 and later and requires the Python programmability plugin.  For v17 and later, there is a custom dialog that can be installed.  It can be downloaded from SPSS Developer Central, www.spss.com/devcentral.

HTH,
Jon Peck
setsmacro /help.
SETSMACRO [SETS=list of variable set names]
[MACRONAME=name] [FAIL={NO*|YES}]
[/SAVE OUTFILE=filespecification]
[/HELP].

Create macro variable for one or more variable sets.

SETS specifies a list of set names to retrieve.  The list is not case sensitive.
If it is omitted, all sets are retrieved.

MACRONAME optionally gives a name for a macro whose value will be all the variable names
in the sets retrieved.  Duplicate variables names are ignored.

FAIL specifies whether to raise an error if any requested set is not found.  By default, no error
is raised.

OUTFILE can specify a filename to receive the list of variables found in the sets retrieved.
If MACRONAME is specified, it will contain the syntax for defining the macro.  Otherwise it
holds just the names.

/HELP prints this help and does nothing else.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David Wright
Sent: Tuesday, July 14, 2009 8:51 AM
To: [hidden email]
Subject: [SPSSX-L] defining variable set via syntax

Is there a way to define variable sets by way of syntax?  The Utilities menu for the Define Variable Sets doesn't offer a paste function & couldn't find anything in the syntax reference guide beyond the Apply Dictionary command.

David

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD