With that we can tie each item back to the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ctedVSE then output notInRulesBase; run; Finally we generate a SAS SQL Passs-Through query that is written to a text file. Not shown is where we derive a macro value named &_len. That’s the length of the longest whereCriteria in the dataset. We use it to line up a comment for each of the where criteria in the generated code showing the selection ID associated with it. With that we can tie each item back to the Requirements Document and quickly verify accuracy and completeness. filename psc4106 "&_localDir\sql_select_query_&_aprimoID..txt"; data _null_; set selected end=eof; file psc4106; len=&_len; if _n_=1 then put @5 "CREATE TABLE &_aprimoID._BASE_POPULATION AS" / @10 'SELECT * ' / @10 'FROM CONNECTION TO ORACLE' / @15 '(SELECT * ' / @15 "FROM &_dataSource" / @15 'WHERE'; %** Add the Rule Identifier as a comment next to each criteria. ; if _n_=1 then put @21 whereCriteria @len+17+10 '/* ' id ' */'; else put @17 'and ' whereCriteria @len+17+10 '/* ' id ' */'; if eof then put @10 ') ;' ; run; And here’s what the text file looks like. Many of the criteria use binary values where 1=Yes and 0=No. So criteria such as dcsd_in=0 translates as ‘deceased indicator is no’. CREATE TABLE abc123_BASE_POPULATION AS SELECT * FROM CONNECTION TO ORACLE (SELECT * FROM ORCDB.CUST_TRGTING_D143 WHERE CUST_XSELL_CT >= 3 8 /* IS001 */ SAS Global Forum 2013 and and and and and and and and and and and and and and and and and and and and and and ); Foundations and Fundamentals HI_VAL_TYP_CD IN ('HV02’,’HV03’) STATE_CD IN ('CA’,’FL’,’TX’) OPEN_ACCT_CT_HOGAN >= 2 BUS_DEP_PRIM_CT >= 1 RET_DEP_IBT_PRIM_CT >= 1 RET_DEP_MRA_PRIM_CT >= 1 dcsd_in=0 unmailable_in=0 blank_uak=0 bad_name=0 bad_addr=0 minor=0 ncoa_suppr=0 epss_no_solicit_in=0 prison_dns_in=0 comb_do_not_mail_in=0 wfb_do_not_mail_in=0 epss_do_not_email_in=0 pcs_in=0 priv_bnk_in=0 trust_in=0 age_drv >= 35 /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /*...
View Full Document

Ask a homework question - tutors are online