Re: Specifying blank custom attribute values in SPSSINC SELECT Variables

Posted by Jon Peck on
URL: http://spssx-discussion.165.s1.nabble.com/Specifying-blank-custom-attribute-values-in-SPSSINC-SELECT-Variables-tp5740494p5740496.html

Here are some examples that work.  If a variable doesn't have an attribute named on ATTRVALUES, it is automatically excluded.

"/ATTRVALUES specifies pairs of attribute names and value lists. For each pair, if the variable has the named attribute, the attribute value must be one of the values listed for that attribute. If the variable does not have the attribute, the test is ignored."


SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle'
    /PROPERTIES
    TYPE=NUMERIC
    /ATTRVALUES
    NAME2=MR.Set VALUE2=""
    /OPTIONS
    ORDER=FILE
    PRINT=YES.

SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle'
    /PROPERTIES
    TYPE=NUMERIC
    /ATTRVALUES
    NAME2=MR.Set VALUE2="" name= source value="input"
    /OPTIONS
    ORDER=FILE
    PRINT=YES.

On Sat, May 1, 2021 at 2:26 PM Art Kendall <[hidden email]> wrote:
I am trying to define subsets of variables based on whether they are ordinary
"Single" variables that have no entry on the custom attribute MR.Set.
 I get this message from
    NAME2=MR.Set VALUE2=" "
    NAME2=MR.Set VALUE2=""
    NAME2=MR.Set VALUE2= string.empty

Warnings
No variables qualify for macro definition !InputSingle

Is there a way to specify an empty string or do I have to put something like
"none" in the custom attribute Mr.Set?

TITLE 'Variables about HH water '.
SUBTITLE 'Single input variables'.
SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle'
    /PROPERTIES
    TYPE=NUMERIC
    /ATTRHASALL 'Var.Grouping' 'Source' 'MR.Set'
    /ATTRVALUES
    NAME =Var.Grouping VALUE="Water"
    NAME1=Source VALUE1="input"
*    NAME2=MR.Set VALUE2=" "*
    /OPTIONS
    ORDER=FILE
    PRINT=YES.

This works and prints the variable names,
SUBTITLE 'Multiple Response variables'
SPSSINC SELECT VARIABLES MACRONAME = '!InputMR'
    /PROPERTIES
    TYPE=NUMERIC
    /ATTRHASALL 'Var.Grouping' 'Source' 'MR.Set'
    /ATTRVALUES
    NAME =Var.Grouping VALUE="Water"
    NAME1=Source VALUE1="input"
*    NAME2=MR.Set VALUE2="$Store.Water"*
    /OPTIONS
    ORDER=FILE
    PRINT=YES.





-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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


--
Jon K Peck
[hidden email]

===================== 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