Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails
%macro MACRO1; data _null_; set $indata1 $indata2; length dsin $16. dsout $17.; dsin='outdata.&outdata1; dsout='outdata.&outdata2; call symput("inset",dsin); call symput("outset",dsout); call execute('%MACRO2(&inset, &outset)'); run; %mend MACRO1; %macro MACRO2(dsin, dsout); data var5data; set &dsin; if car1||car2||car3 = car1a||car2a||car3a then do; Var5 = '1'; end; else if car1||car2 = car1a||car2a then do; Var5 = '3'; end; else if car1 = car1a then do; Var5 = '4'; end; else do; Var5 = '5'; end; output var5data; run; data counts (keep= Var1 Var2 Var3 Va4 Var5 Var6 Var7); length count1 count3 count4 count5 count_in count_out; retain count1 count3 count4 count5 count_in count_out; count_in = count_in +1; set var5data end=lastrec; if Var5 = '1' then count1+1; else if Var5 = '3' then count3+1; else if Var5 = '4' then count4+1; else if Var5 = '5' then count5+1; count_in= count_out+1; output; end; if lastrec then do; file process.log mod; put 'Assign Var5 value for &type'; put 'Total number of records with Var5 = 1: ' count1; put 'Total number of records with Var5 = 3: ' count3; put 'Total number of records with Var5 = 4: ' count4; put 'Total number of records with Var5 = 5: ' count5; put 'Total number of records read in: ' count_in; put 'Total number of records read out: ' count_out; put '*****************************************************'; put ' '; end; run; /* create the permanent dataset */ data &dsout; set counts; run; %mend MACRO2; /* Below macro calls the above macros according to value of TYPE */ %macro MAINMACRO; /* Run Program for TYPE */ %if "&type" = "typea " %then %do; %MACRO2("&indata1", "&outdata1", "&typea"); %end; %else %if "&type" = "typeb " %then %do; %MACRO2("&indata2", "&outdata2", "&typeb"); %end; %mend MAINMACRO; %MAINMACRO;
|Data quality checks||2||34|
|Exchange 2010 Mailbox Database offline||2||59|
|how to update exe applicatio from internet ?||6||41|
|Question About Creating Primary Key Constraints on Oracle Tables...||5||16|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
9 Experts available now in Live!