Re: How to display values of custom attributes.

Posted by Art Kendall on
URL: http://spssx-discussion.165.s1.nabble.com/How-to-display-values-of-custom-attributes-tp5740721p5740725.html

With help from Jon about CODEBOOK and the OMS section, I ended up with this.

I can now easily copy the AttValues dataset to a word processor.

GET
  FILE='C:\Users\Art\Desktop\ Something\August 16 2021.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.
CODEBOOK ALL /VARINFO ATTRIBUTES  /STATISTICS  NONE.
dataset declare attrs.
oms select tables /if subtypes='Variable Attributes'
/destination outfile=attrs format=sav.
display attributes.
omsend.
DATASET ACTIVATE attrs.
* remove Custom Attributes that are specific to each variable.
Select if var2 NE 'Question' and var2 NE 'Comment1'.
sort cases by var2 var3.
dataset declare AttValues.
aggregate outfile=AttValues /break = var2 Var3
    /val= first(var3).
*remove the redundant variable val.
DATASET ACTIVATE AttValues.
DELETE VARIABLES val.

Art Kendall
Social Research Consultants