DATA Step, Macro, Functions and more

Output Formatting

Reply
Contributor
Posts: 53

Output Formatting

 Hi,

 

I have an output (FigA) but want it to look like (FigB) - any ideas?

 

(FigA)

YrMthProductTotal
20101D8445
20101R217
20101E7276
20102D322
20102R6845
20102E6508
20103D474
20103R7503
20103E6960
20111D6508
20111R6558
20111E6608
20112D6658
20112R6708
20112E200
20113D250
20113R900
20113E950

 

 

(FigB)

YrProductTotal
2010D9241
 R14565
 E20744
2011D13416
 R14166
 E7758
Super User
Posts: 17,819

Re: Output Formatting

Proc REPORT, TABULATE OR FREQ. 

 

I'd probably start with TABULATE. 

Contributor
Posts: 53

Re: Output Formatting

Tabulate works but I need it to be in an output file not a table. When I use OUT= it doesn't keep the format of the proc tabulate and instead refers back to original file.

 

 

Super User
Posts: 17,819

Re: Output Formatting

Given your sample they should be the same structure.

You can try PROC MEANS or FREQ. 

i recommend against including missing values in first column.

Super User
Posts: 10,497

Re: Output Formatting

If you want this in a data set what is the purpose of the blank values for year?

What will you do with the resulting data set?

Ask a Question
Discussion stats
  • 4 replies
  • 122 views
  • 0 likes
  • 3 in conversation