Dictionary Output One Table

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

Dictionary Output One Table

Mario Giesel
Hello, SPSS friends,

Is it possible to produce Variable Labels and Value Lables information into ONE table via DISPLAY or any other command?

E.g.

gender    Gender of respondent    1    Male
2    Female

... etc.

Thanks for any ideas,
  Mario
Mario Giesel
Munich, Germany
Reply | Threaded
Open this post in threaded view
|

Re: Dictionary Output One Table

Jon K Peck
You can do this with the CODEBOOK command.  This, however, gives one table per variable.  Here is an example.
CODEBOOK  JOBCAT [n] EDUC [o] GENDER [n]
  /VARINFO LABEL VALUELABELS
  /OPTIONS VARORDER=VARLIST SORT=ASCENDING MAXCATS=200
  /STATISTICS NONE.

If you wanted to merge all the variables into a single table, it could be done with a short Python program instead.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Mario Giesel <[hidden email]>
To:        [hidden email],
Date:        03/26/2014 10:59 AM
Subject:        [SPSSX-L] Dictionary Output One Table
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hello, SPSS friends,

Is it possible to produce Variable Labels and Value Lables information into ONE table via DISPLAY or any other command?

E.g.

gender    Gender of respondent    1    Male
2    Female


... etc.

Thanks for any ideas,
  Mario
Reply | Threaded
Open this post in threaded view
|

Re: Dictionary Output One Table

Jon K Peck
One other point: you can use OMS to aggregate all the separate variable tables into a single dataset that can then be listed or used for other purposes.
dataset declare varinfo.
oms select tables /if subtypes='Variable Information'
/destination outfile=varinfo format=sav.
CODEBOOK  JOBCAT [n] EDUC [o] GENDER [n]
  /VARINFO LABEL VALUELABELS
  /OPTIONS VARORDER=VARLIST SORT=ASCENDING MAXCATS=200
  /STATISTICS NONE.
omsend.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Jon K Peck/Chicago/IBM@IBMUS
To:        [hidden email],
Date:        03/26/2014 11:25 AM
Subject:        Re: [SPSSX-L] Dictionary Output One Table
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




You can do this with the CODEBOOK command.  This, however, gives one table per variable.  Here is an example.
CODEBOOK  JOBCAT [n] EDUC [o] GENDER [n]

 /VARINFO LABEL VALUELABELS

 /OPTIONS VARORDER=VARLIST SORT=ASCENDING MAXCATS=200

 /STATISTICS NONE.


If you wanted to merge all the variables into a single table, it could be done with a short Python program instead.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621





From:        
Mario Giesel <[hidden email]>
To:        
[hidden email],
Date:        
03/26/2014 10:59 AM
Subject:        
[SPSSX-L] Dictionary Output One Table
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Hello, SPSS friends,


Is it possible to produce Variable Labels and Value Lables information into ONE table via DISPLAY or any other command?


E.g.

gender    Gender of respondent    1    Male
2    Female


... etc.


Thanks for any ideas,

 Mario

Reply | Threaded
Open this post in threaded view
|

Re: Dictionary Output One Table

Mario Giesel
Thanks Jon,


Mario Giesel <[hidden email]> schrieb am 5:33 Donnerstag, 27.März 2014:
...


Jon K Peck <[hidden email]> schrieb am 18:35 Mittwoch, 26.März 2014:
One other point: you can use OMS to aggregate all the separate variable tables into a single dataset that can then be listed or used for other purposes.
dataset declare varinfo.
oms select tables /if subtypes='Variable Information'
/destination outfile=varinfo format=sav.
CODEBOOK  JOBCAT [n] EDUC [o] GENDER [n]
  /VARINFO LABEL VALUELABELS
  /OPTIONS VARORDER=VARLIST SORT=ASCENDING MAXCATS=200
  /STATISTICS NONE.
omsend.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Jon K Peck/Chicago/IBM@IBMUS
To:        [hidden email],
Date:        03/26/2014 11:25 AM
Subject:        Re: [SPSSX-L] Dictionary Output One Table
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




You can do this with the CODEBOOK command.  This, however, gives one table per variable.  Here is an example.
CODEBOOK  JOBCAT [n] EDUC [o] GENDER [n]

 /VARINFO LABEL VALUELABELS

 /OPTIONS VARORDER=VARLIST SORT=ASCENDING MAXCATS=200

 /STATISTICS NONE.


If you wanted to merge all the variables into a single table, it could be done with a short Python program instead.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621





From:        
Mario Giesel <[hidden email]>
To:        
[hidden email],
Date:        
03/26/2014 10:59 AM
Subject:        
[SPSSX-L] Dictionary Output One Table
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Hello, SPSS friends,


Is it possible to produce Variable Labels and Value Lables information into ONE table via DISPLAY or any other command?


E.g.

gender    Gender of respondent    1    Male
2    Female


... etc.


Thanks for any ideas,

 Mario





  that was the command I was looking for.
GL,
  Mario
Mario Giesel
Munich, Germany