Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data pr5;
- set pr4;
- *--- create dummy date for PREFL calculation;
- if substr(PRSTDTC,5,1) ne '-' then do;
- PAR_STD=cat(trim(PRSTDTC) || '-01-01');
- end;
- if substr(PRSTDTC,8,1) ne '-' and PAR_STD= "" then do;
- PAR_STD=cat(trim(PRSTDTC) || '-01');
- end;
- dumdate= input(PAR_STD, yymmdd10.);
- format dumdate date9.;
- *--- create PREFL variable;
- if AENDT > . and AENDT <= TRTSDT then PREFL = "Y";
- else if dumdate ne . and dumdate < TRTSDT then PREFL = "Y";
- run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement