Help using Base SAS procedures

Proc Report define "across" problem

Reply
N/A
Posts: 0

Proc Report define "across" problem

Hello experts-
In my dataset, I have a simple variable with 4 values of 1,2,3,4. While there will never be missing data, often not all values will appear in the actual data. However, I would like all values to appear in the report column, with a 0 freq count showing in the cell.

How can I force all this? Here is the define statement I am using:

define eval / across order=freq descending format=evaltyp.
center width=30 spacing=4 left "Evaluation Result";

Thanks !
Francine
College of American Pathologists
SAS Super FREQ
Posts: 8,745

Re: Proc Report define "across" problem

Hi:
Assuming that your user-defined format has all the values, then you probably just need to add the PRELOADFMT option to your DEFINE statement:

[pre]
define eval / across order=freq descending format=evaltyp. preloadfmt
center width=30 spacing=4 left "Evaluation Result";
[/pre]

You'd also need to have [pre]
OPTIONS MISSING=0;
PROC REPORT ....;
RUN;
[/pre]

or else you'll get a . for the missing.

cynthia
N/A
Posts: 0

Re: Proc Report define "across" problem

Cynthia,
thank you very much. This is a perfect fix for my problem.
Ask a Question
Discussion stats
  • 2 replies
  • 99 views
  • 0 likes
  • 2 in conversation