7.2.1 Generating the file: SPSS syntax

** 1) Read from a plain text file which lists every title-by-status permutation (including missing). 
data list file="alltitlebystatunitnumbs.dat" free / occbst. 
variable label occbst "Title-by-status". 
** 2) Derive title, status, and subgroup units . 
compute occ=trunc(occbst/10). 
compute empst=occbst - (10*(trunc(occbst/10))). 
variable label occ "Occupational title". 
variable label empst "Employment Status". 
compute o1gp1=trunc(occ/1000). 
compute o1gp2=trunc(occ/100). 
compute o1gp3=trunc(occ/10). 
compute o1gp1st=trunc(occ/1000). 
compute o1gp2st=trunc(occ/100). 
compute o1gp3st=trunc(occ/10). 
variable label o1gp1 "Occupational major group". 
variable label o1gp2 "Occupational sub-major group". 
variable label o1gp3 "Occupational minor group". 
variable label o1gp1st "Occupational major group-by-status". 
variable label o1gp2st "Occupational sub-major group-by-status". 
variable label o1gp3st "Occupational minor group-by-status". 

** 3) Add value labels . 
include file="versionlabels.sps". 
occlab occ={occ}. 
stlab occ={empst}. 
bstlab occ={occbst}. 
majlab occ={o1gp}. 
*etc. 
sav out="indexbase.sav". 


Return to Generating an occupational index file


Last modified 14 February 2002
This document is maintained by Paul Lambert (paul.lambert@stirling.ac.uk)