Appendix 1: Sample SAS Program
libname jobs18 "c:\mydata\jobs18";
libname jobs19 "c:\mydata\jobs19";
proc export data=jobs18.jobs18 outfile= jobs18.dta;
run;
proc export data=jobs19.jobs19 outfile= jobs19.dta;
run;
name: <unnamed>
log: c:\mydata\APPdofile.log
log type: text
.
use "c:\mydata\jobs19.dta", clear
format PANEL SUBTYPE STILLAT SICKPAY %3.0f
keep if PANEL==23 & RN==3 & SUBTYPE==1 & STILLAT==1
& SICKPAY==-1
(44,859 observations deleted)
save " c:\mydata\j19r3.dta", replace
(note: file c:\mydata\j19r3.dta not found)
file c:\mydata\j19r3.dta saved
asdoc list JOBIDX PANEL RN SUBTYPE STILLAT SICKPAY
if _n<=20, font(arial) fs(8) separator(0) noobs
> , save(stata_output.doc) title(Print Sample of
Continuation Round 3 Records)
use " c:\mydata\jobs18.dta", clear
. format PANEL SUBTYPE STILLAT SICKPAY %3.0f
. keep if PANEL==23 & SUBTYPE==1 & STILLAT==-1 &
inrange(RN,1,2)
(45,549 observations deleted)
asdoc list JOBIDX PANEL RN SUBTYPE STILLAT SICKPAY
if _n<=20, font(arial) fs(8) separator(0) noob
> s, save(stata_output.doc) title(Print Sample of
Newly Reported Round 1 and Round 2 Records)
(File stata_output.doc already exists, option append
was assumed)
asdoc tabulate SICKPAY, font(arial) fs(8),
save(stata_output.doc) title(Sickpay Value of FY2018 Ro
> und 1 and Round 2 Newly Reported CMJs)
(File stata_output.doc already exists, option append
was assumed)
sort JOBIDX
.
. save " c:\mydata\j1812.dta", replace
(note: file c:\mydata\j1812.dta not found)
file c:\mydata\j1812.dta saved
rename SICKPAY SICKPAYX
.
. keep JOBIDX SICKPAYX
.
. merge m:m JOBIDX using "c:\mydata\j19r3.dta", n
> ogenerate keep(match using)
Result # of obs.
save "c:\mydata\j19r3f.dta", replace
(note: file c:\mydata\j19r3f.dta not found)
file c:\mydata\j19r3f.dta saved
asdoc tabulate SICKPAY SICKPAYX,
save(stata_output.doc) font(arial) fs(8) title(Diagnostic Post-Me
> rge - Sickpay * Sickpayx)
(File stata_output.doc already exists, option append
was assumed)
log close
name: <unnamed>
log: c:\mydata\APPdofile.log
log type: text