I want a output dataset have 20 tables like below come column wise..
1 2 3 4 5 6 7 8 ................................. 20
1*1=1 2*1=2 20*1=20
1*2=2 2*2=4 20*2=40
... ........
.. .......
1*10=10 2*10=20 20*10=200
Like this i want output have 20 tables..
Please anyone write programme for this question ... !!!!!!!
Like this?
data have(drop=i j);
array c {20};
do i = 1 to 10;
do j = 1 to 20;
c [j] = i*j;
end;
output;
end;
run;
Almost correct....But in output we get after multiplication values only....we want 1*1=1 2*1=2 3*1=3 4*1=4 . .............20*1=20
1*2=2 2*2=4 3*2=6 4*2=8 .............. 20*2=40
...........................................................................
1*10=10 2*10=20 3*10=30 4*10=40 ..........20*10=200
Like this before multiplication format also come into output...i hope you understand my question....!!!
I fail to see why, but there you go
data have(drop=i j);
array c {20} $;
do i = 1 to 10;
do j = 1 to 20;
c [j] = cats(j, '*', i, '=', i*j);
end;
output;
end;
run;
Thankyou for your help....but in output we get values like 1*1=1 1*2=2 1*3=3..........................1*20=20
10*1=10 10*2=20 10*3=30.............. 10*20=200
but we want values in correct order like 1*1=1 2*1 3*1=3 ................................20*1=20
1*10=10 2*10=20 3*10=30....................20*10=200 Like this order wise we get table..please have a look on problem just modify that..how we get tables in order type...
Ok, I just changed the values around. Please try again.
Almost ok but output dataset have only after multiplication values.....
But we want before multiplication format also like
1*1=1 2*1=2 3*1=3 ...................20*1=20
.............................................................
1*10=10 2*10=20 3*10=.................20*10=200
like this we want output...so please help in a programme
Please run my code above. Does exactly what you ask.
I want output dataset have 20 Tables like below.. in Horizontal wise
1 2 3 4 5 6 7 8 9 ........................ 20
-- --- -- -- -- --- -- -- --- ....................... --
1*1=1 2*1=2 20*1=20
1*2=2 2*2=4 20*2=40
1*3=3 2*3=6 20*3=60
....... ........ ..........
....... ........ ..........
....... ........ ..........
1*10=10 2*10=20 20*10=200
Like this i want 20 Tables in output dataset....
If anyone know how to get this please write a programme in SAS !!!
I moved this question back into the original thread with the same question. Pleade do not clutter the forum with unnecessary double posts, study the answers already given.
The words "dataset" and "table" are often used synonymous, so your request
@Mohan_Reddy wrote:
I want a output dataset have 20 tables like below come column wise..
does not make any sense.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.