************************************************************ * PROGRAM: QPH.SAS Parental Health * * PROGRAMMER: John Klaric * * PURPOSE: Create a SAS dataset containing * * variables from raw data in the * * PxAE datasets. * * MODIFIED: J.Godwin to correspond to naming conventions* * 8/31/04 * INPUT: P&yr.AE, where &yr. is the yr specified * * OUTPUT: PQH&yr., where &yr. is the yr specified * ************************************************************; %let yr = 11 ; libname sasin "N:\Datasets\Parent\Parental Health\U"; libname sasout "N:\Datasets\Parent\Parental Health\S"; *************** DO NOT MODIFY BELOW THIS LINE ******************************; DATA qph; SET sasin.p&yr.ae; if p&yr.ae8 in (1) then QPH&yr.AFQ=1; else if p&yr.ae8 in (2,3) then QPH&yr.AFQ=2; else if p&yr.ae8 in (4,5,6) then QPH&yr.AFQ=3; if p&yr.ae9 in (1) then QPH&yr.FQB=1; else if p&yr.ae9 in (2,3,4) then QPH&yr.FQB=2; else if p&yr.ae9 in (5,6) then QPH&yr.FQB=3; if p&yr.ae8 =1 then QPH&yr.FQB=1; QPH&yr.GEN=p&yr.ae6; QPH&yr.SMK=p&yr.ae10; label QPH&yr.FQB="Freq Binge Drink: 1=Never,2=1-3x/m,2=4+x/m QPH&yr." QPH&yr.AFQ="Freq Drink: 1=Never,2=Occ(1-3x/m),3=Wkly+(1/wk+) QPH&yr." QPH&yr.GEN="General Health: 1=Excel.,2=Very Good,3=Good,4=Fair,5=Poor QPH&yr." QPH&yr.SMK="Currently Smoke: 1=Yes,2=No QPH&yr." ; run; data sasout.QPH&yr.; set qph; run; proc sort;by cohort site tcid;