data work.lfs; Set RTRAdata.LFS201620(keep = SMTH SYEAR SIC5 FTPTMAIN EVERWORK PERMTEMP id); /*survey year, variable SYEAR*/ If SYEAR = 2018; /*survey month variable SMTH*/ If SMTH = 07 then Month = "July"; /*PERMTEMP assigning tags to variable values*/ If PERMTEMP = 1 then JobStatus = "Permanent"; Else If PERMTEMP = 2 then JobStatus = "Not Permanent"; Else JobStatus = "Other"; /* SIC5 variable tag values*/ If SIC5 = 02111 then Industry = "Oil and Gas Extraction"; Else If SIC5 = 02121 then Industry = "Coal Mining"; Else If SIC5 = 01133 then Industry = "Logging"; Else Industry = "Other"; /*FTPTMAIN variable*/ If FTPTMAIN = 1 then WorkSchedule = "Full-time"; Else if FTPTMAIN = 2 then WorkSchedule = "Part-time"; Else WorkSchedule = "Other"; %RTRAFreq( InputDataset=work.lfs, OutputName=anythingyouwant, ClassVarList=JobStatus WorkSchedule Industry, UserWeight=FINALWT); run;