12-04-2017 02:11 PM
I realize this is probably super easy, but I don't know how....
Trying to create a table in sas that simply has number 1 - 90:
SAS EG 7.13
12-04-2017 02:26 PM
Why do you need a dataset containing the numbers 1 to 90?
The problem can be solved with a small data-step, i recommend reading the sas documentation.
data work.number; length header 8; do header = 1 to 90; output; end; run;
12-04-2017 02:44 PM - last edited on 12-04-2017 03:00 PM by Reeza
Hi, sounds like you are learner like me, so I am sharing my learning approach with the following experiments to understand operations, iterations, and explicit output:
/* using infinite increments with support from break and continue structures*/ data w; do i= 1 by 1; output; if i=90 then leave; end; run; /*while expression*/ data w1; do while(i<90); i+1; output; end; run; /*until expression*/ data w2; do until(i=90); i+1; output; end; run; /* start and stop with constant operands*/ data w3; do i=1 to 90; output; end; run; /* using operands*/ data w4; start=1; increment=1; stop=90; do i=start by increment to stop; output; end; keep i; run; ;
Need further help from the community? Please ask a new question.