Discussion:
proc print question
(too old to reply)
Masoud Pajoh
2008-07-30 18:02:10 UTC
Permalink
I have a data set with 10 vars.

This:

proc print data=a;
var var1-var10;
run;
it prints all 10 vars on the same line.

var1 var2 var3 var4 var5 var6 var7 var8 var9
var10

1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10

Now is there a way to print let's say 7 vars on the first line and the
rest underneath?
like this:

var1 var2 var3 var4 var5 var6 var7

1 2 3 4 5 6 7
1 2 3 4 5 6 7
1 2 3 4 5 6 7
1 2 3 4 5 6 7
1 2 3 4 5 6 7

var8 var9 var10
8 9 10
8 9 10
8 9 10
8 9 10
8 9 10


thanks for the help
tanwan
2008-07-30 19:55:10 UTC
Permalink
AFAIK you can no do that with SAS.


However try narrowing the page width with differing values of xx in:

options linesize = xx;
proc print width=uniform data = a;
run;

until you get what you want.


More elegant solutions include messing (read 're=arranging') the data,
perhaps proc report, et cetera.

Loading...