In clinical reporting, we may require to have all the possible combination displayed in report objects among the specified variable in a datasets. There are many ways to accomplish this task and here are couple techniques to achieve the same. data dummy; subjid=1; trt=1; resp=’N’; ; agegrp=’>=65′; output; subjid=2; trt=2; resp=’Y’; agegrp=’<65 ‘; …
Tag Archive: SAS BASE
In version 9, SAS introduced MEDIAN function in Proc SQL with limitation that it can be used only to return median value of current row(observation). proc sql; Create table meddata as select usubjid, median(var1, var2, var3, var4 ) as medvar from vsdata; quit;
Use the EXCHANGE statement in PROC DATASETS to swap the names of two SAS files. This example changes the name of WORK.PLACE to WORK.ADDRESS and changes the name of WORK.ADDRESS to WORK.PLACE: proc datasets library=work nolist; exchange address=place;quit; Note: PROC DATASETS statement writes a member list in the log. NOLIST suppresses this.
ODS (Output Delivery System) statements provide greater flexibility in generating, storing and reproducing SAS procedure and DATA step output. ODS system in SAS 9.2 is very powerful and ODS PDF statement can be used to generate outputs in PDF format. If the files are not encrypted, anyone can view and edit these files using acrobat. …
CALL EXECUTE is a powerful tool which provide optimal solutions for various programming task. The CALL EXECUTE routine allows us to build statements that are stacked for later execution. CALL EXECUTE statements are resolved first and then moved to the input stack while iterating the data step. CALL EXECUTE resolves its argument and executes the …