Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data test;
- input name ~ & $15.;
- datalines;
- 100% BLO
- 100% COLOR
- AVON & RAGOBERT
- BALLANTINE'S
- L'OREAL
- AT&T
- U-V-A
- ;
- run;
- %macro name_modal();
- /*Create macro variables which contain the modalities of variables*/
- %do i=1 %to 4;
- data _null_;
- set test;
- call symputx('num_Mod1',_N_,"G");
- call symputx('tableb'||compress(put(&i,4.))||'modal'||compress(put(_N_,4.)),name,"G");
- run;
- %end;
- %do i=1 %to 4;
- %do j=1 %to 7;
- %put %superq(tableb&i.modal&j);
- %end;
- %end;
- %mend name_modal;
- %name_modal();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement