* Beispiel von Kajetan Hinner, www.hinner.com/soep *.
* ------------------------------------------------------------ *.
* This command file was generated by SOEPINFO-WWW *.
* from the SOEP HOMEPAGE: http://www.diw-berlin.de/soep. *.
* *.
* !!! I M P O R T A N T - W A R N I N G !!! *.
* You alone are responsible for contents and appropriate *.
* usage by accepting the usage agreement. *.
* ------------------------------------------------------------ *.
* To copy this command file to your own harddisk: *.
* Use your mouse or (CNTL-A) to select this text, then "copy" *.
* (CNTL-C) then in your windows application, or in a text *.
* editor, "paste" (CNTL-V). *.
* ------------------------------------------------------------ *.
* *.
* Please report any errors of the SPSS code generated here *.
* to Jan Goebel <jgoebel@diw.de> *.
* ------------------------------------------------------------ *.
* WARNING: SPSS for UNIX only allows up to 99 files to *.
* be accessed in a single retrieval. This is hard *.
* coded by SPSS and we cannot change this. You may *.
* have to run your retrieval in smaller blocks. *.
* ----------------------------------------------------------- *.
* *.
set compression on.
set header off.
* ----------- Here you can customize the paths: ----------- *.
* ------ (With special thanks to Dr. Kajetan Hinner) ------ *.
define !pathin() "o:\soep\lehre\" !enddefine.
define !pathout() "c:\temp\" !enddefine.
* ----------------[ automatically pull PPFAD ]----------------- *.
get file = !pathin+'ppfad.sav'
/keep = hhnr persnr sex gebjahr psample
ahhnr bhhnr chhnr dhhnr ehhnr fhhnr ghhnr hhhnr
ihhnr jhhnr khhnr lhhnr mhhnr nhhnr ohhnr phhnr
qhhnr rhhnr shhnr thhnr uhhnr vhhnr
anetto bnetto cnetto dnetto enetto fnetto gnetto hnetto
inetto jnetto knetto lnetto mnetto nnetto onetto pnetto
qnetto rnetto snetto tnetto unetto vnetto.
* --------------[ balanced / unbalanced design ]--------------- *.
select if ( (anetto ge 1) or (bnetto ge 1) or (cnetto ge 1) or
(dnetto ge 1) or (enetto ge 1) or (fnetto ge 1) or
(gnetto ge 1) or (hnetto ge 1) or (inetto ge 1) or
(jnetto ge 1) or (knetto ge 1) or (lnetto ge 1) or
(mnetto ge 1) or (nnetto ge 1) or (onetto ge 1) or
(pnetto ge 1) or (qnetto ge 1) or (rnetto ge 1) or
(snetto ge 1) or (tnetto ge 1) or (unetto ge 1) or
(vnetto ge 1) ).
* ----------------------[ define sample ]---------------------- *.
select if ( (psample eq 1) or (psample eq 2) or (psample eq 3) or
(psample eq 4) or (psample eq 5) or (psample eq 6) or
(psample eq 7) ).
sort cases by persnr.
save outfile = !pathout+'ppfad.sav'.
* -----------------[ automatically pull phrf ]----------------- *.
get file = !pathin+'phrf.sav'
/keep = hhnr persnr prgroup
aphrf bphrf cphrf dphrf ephrf fphrf gphrf hphrf
iphrf jphrf kphrf lphrf mphrf nphrf ophrf pphrf
qphrf rphrf sphrf tphrf uphrf vphrf
bpbleib cpbleib dpbleib epbleib fpbleib gpbleib hpbleib ipbleib
jpbleib kpbleib lpbleib mpbleib npbleib opbleib ppbleib qpbleib
rpbleib spbleib tpbleib upbleib vpbleib.
sort cases by persnr.
save outfile = !pathout+'phrf.sav'.
* --------------[ automatically create pmaster ]--------------- *.
match files file = !pathout+'ppfad.sav'
/table = !pathout+'phrf.sav'
/by persnr.
save outfile = !pathout+'pmaster.sav'.
* -------------------------( pull AP )------------------------- *.
get file = !pathin+'ap.sav'
/keep = hhnr ahhnr persnr
ap0301.
sort cases by persnr.
save outfile = !pathout+'ap.sav'.
* -------------------------( pull BP )------------------------- *.
get file = !pathin+'bp.sav'
/keep = hhnr bhhnr persnr
bp0101.
sort cases by persnr.
save outfile = !pathout+'bp.sav'.
* -------------------------( pull CP )------------------------- *.
get file = !pathin+'cp.sav'
/keep = hhnr chhnr persnr
cp0101.
sort cases by persnr.
save outfile = !pathout+'cp.sav'.
* -------------------------( pull DP )------------------------- *.
get file = !pathin+'dp.sav'
/keep = hhnr dhhnr persnr
dp0101.
sort cases by persnr.
save outfile = !pathout+'dp.sav'.
* -------------------------( pull EP )------------------------- *.
get file = !pathin+'ep.sav'
/keep = hhnr ehhnr persnr
ep0101.
sort cases by persnr.
save outfile = !pathout+'ep.sav'.
* -------------------------( pull FP )------------------------- *.
get file = !pathin+'fp.sav'
/keep = hhnr fhhnr persnr
fp0101.
sort cases by persnr.
save outfile = !pathout+'fp.sav'.
* -------------------------( pull GP )------------------------- *.
get file = !pathin+'gp.sav'
/keep = hhnr ghhnr persnr
gp0101.
sort cases by persnr.
save outfile = !pathout+'gp.sav'.
* -----------------------( pull GPOST )------------------------ *.
get file = !pathin+'gpost.sav'
/keep = hhnr ghhnr persnr
zp5501.
sort cases by persnr.
save outfile = !pathout+'gpost.sav'.
* -------------------------( pull HP )------------------------- *.
get file = !pathin+'hp.sav'
/keep = hhnr hhhnr persnr
hp1001.
sort cases by persnr.
save outfile = !pathout+'hp.sav'.
* -------------------------( pull IP )------------------------- *.
get file = !pathin+'ip.sav'
/keep = hhnr ihhnr persnr
ip9801.
sort cases by persnr.
save outfile = !pathout+'ip.sav'.
* -------------------------( pull JP )------------------------- *.
get file = !pathin+'jp.sav'
/keep = hhnr jhhnr persnr
jp0101.
sort cases by persnr.
save outfile = !pathout+'jp.sav'.
* -------------------------( pull KP )------------------------- *.
get file = !pathin+'kp.sav'
/keep = hhnr khhnr persnr
kp0101.
sort cases by persnr.
save outfile = !pathout+'kp.sav'.
* -------------------------( pull LP )------------------------- *.
get file = !pathin+'lp.sav'
/keep = hhnr lhhnr persnr
lp0101.
sort cases by persnr.
save outfile = !pathout+'lp.sav'.
* -------------------------( pull MP )------------------------- *.
get file = !pathin+'mp.sav'
/keep = hhnr mhhnr persnr
mp0101.
sort cases by persnr.
save outfile = !pathout+'mp.sav'.
* -------------------------( pull NP )------------------------- *.
get file = !pathin+'np.sav'
/keep = hhnr nhhnr persnr
np0101.
sort cases by persnr.
save outfile = !pathout+'np.sav'.
* -------------------------( pull OP )------------------------- *.
get file = !pathin+'op.sav'
/keep = hhnr ohhnr persnr
op0101.
sort cases by persnr.
save outfile = !pathout+'op.sav'.
* -------------------------( pull PP )------------------------- *.
get file = !pathin+'pp.sav'
/keep = hhnr phhnr persnr
pp0101.
sort cases by persnr.
save outfile = !pathout+'pp.sav'.
* -------------------------( pull QP )------------------------- *.
get file = !pathin+'qp.sav'
/keep = hhnr qhhnr persnr
qp0101.
sort cases by persnr.
save outfile = !pathout+'qp.sav'.
* -------------------------( pull RP )------------------------- *.
get file = !pathin+'rp.sav'
/keep = hhnr rhhnr persnr
rp0101.
sort cases by persnr.
save outfile = !pathout+'rp.sav'.
* -------------------------( pull SP )------------------------- *.
get file = !pathin+'sp.sav'
/keep = hhnr shhnr persnr
sp0101.
sort cases by persnr.
save outfile = !pathout+'sp.sav'.
* -------------------------( pull TP )------------------------- *.
get file = !pathin+'tp.sav'
/keep = hhnr thhnr persnr
tp0101.
sort cases by persnr.
save outfile = !pathout+'tp.sav'.
* -------------------------( pull UP )------------------------- *.
get file = !pathin+'up.sav'
/keep = hhnr uhhnr persnr
up0101.
sort cases by persnr.
save outfile = !pathout+'up.sav'.
* -------------------------( pull VP )------------------------- *.
get file = !pathin+'vp.sav'
/keep = hhnr vhhnr persnr
vp0101.
sort cases by persnr.
save outfile = !pathout+'vp.sav'.
* ------------------( Now merge all together)------------------ *.
get file = !pathout+'pmaster.sav'.
* -----------( merge together by person: ALL Waves )----------- *.
sort cases by persnr.
match files file = *
/table = !pathout+'ap.sav'
/by persnr.
match files file = *
/table = !pathout+'bp.sav'
/by persnr.
match files file = *
/table = !pathout+'cp.sav'
/by persnr.
match files file = *
/table = !pathout+'dp.sav'
/by persnr.
match files file = *
/table = !pathout+'ep.sav'
/by persnr.
match files file = *
/table = !pathout+'fp.sav'
/by persnr.
match files file = *
/table = !pathout+'gp.sav'
/by persnr.
match files file = *
/table = !pathout+'gpost.sav'
/by persnr.
match files file = *
/table = !pathout+'hp.sav'
/by persnr.
match files file = *
/table = !pathout+'ip.sav'
/by persnr.
match files file = *
/table = !pathout+'jp.sav'
/by persnr.
match files file = *
/table = !pathout+'kp.sav'
/by persnr.
match files file = *
/table = !pathout+'lp.sav'
/by persnr.
match files file = *
/table = !pathout+'mp.sav'
/by persnr.
match files file = *
/table = !pathout+'np.sav'
/by persnr.
match files file = *
/table = !pathout+'op.sav'
/by persnr.
match files file = *
/table = !pathout+'pp.sav'
/by persnr.
match files file = *
/table = !pathout+'qp.sav'
/by persnr.
match files file = *
/table = !pathout+'rp.sav'
/by persnr.
match files file = *
/table = !pathout+'sp.sav'
/by persnr.
match files file = *
/table = !pathout+'tp.sav'
/by persnr.
match files file = *
/table = !pathout+'up.sav'
/by persnr.
match files file = *
/table = !pathout+'vp.sav'
/by persnr.
* --------------------( save output file )--------------------- *.
file label "SOEPINFO: Magic at Work! http://www.diw.de/soep/".
save outfile = !pathout+'new.sav'.
desc all.
* -----------------( discard temporary files )----------------- *.
erase file = !pathout+'ppfad.sav'.
erase file = !pathout+'phrf.sav'.
erase file = !pathout+'pmaster.sav'.
erase file = !pathout+'ap.sav'.
erase file = !pathout+'bp.sav'.
erase file = !pathout+'cp.sav'.
erase file = !pathout+'dp.sav'.
erase file = !pathout+'ep.sav'.
erase file = !pathout+'fp.sav'.
erase file = !pathout+'gp.sav'.
erase file = !pathout+'gpost.sav'.
erase file = !pathout+'hp.sav'.
erase file = !pathout+'ip.sav'.
erase file = !pathout+'jp.sav'.
erase file = !pathout+'kp.sav'.
erase file = !pathout+'lp.sav'.
erase file = !pathout+'mp.sav'.
erase file = !pathout+'np.sav'.
erase file = !pathout+'op.sav'.
erase file = !pathout+'pp.sav'.
erase file = !pathout+'qp.sav'.
erase file = !pathout+'rp.sav'.
erase file = !pathout+'sp.sav'.
erase file = !pathout+'tp.sav'.
erase file = !pathout+'up.sav'.
erase file = !pathout+'vp.sav'.
finish.