macro - dm 'log;clear;output;clear;'; o options ps=50 ls=75...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
dm 'log;clear;output;clear;'; options ps=50 ls=75 pageno=1; o *********************************************************************; ** **; ** COURSE: STAT 6360 **; ** PURPOSE: Show how to use SAS MACROs **; *********************************************************************; * *The following title will appear as the first line of every page in the output window; title1 'STAT 6360'; t *Try a MACRO variable for sample size n; data normal; %let n=10; do i=1 to &n; norm=normal(0); output; end; e proc print; run; r data time; time = hour(time()); minute = minute(time()); second = second(time()); month = month(today()); day = day(today()); year = year(today()); run; %let title=The date and time is:; title2 "&title"; proc print data=time; run; r *Show what happens when we use single quotes; title2 '&title'; proc print data=time; run; r *Try a new use of a MACRO variable; %let hour_of_day = time; title2 'The hour of the day is'; proc print data=time; var &hour_of_day; run; r *Examples of writing to the LOG window;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

macro - dm 'log;clear;output;clear;'; o options ps=50 ls=75...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online