How does sorting by multiple variables work in a proc report?

117 views Asked by At

I just don't get it. I have few numeric dates and have to sort my report by them(and do not display) I need to sort by SUBJECT then DTN then STDTN then ENDTN; Regular sas sorting:

proc sort;
by SUBJECT DTN STDTN ENDTN;
end; 

does exactly what I need. but how to make it in poc report? When I use

define SUBJECT /order order=internal;
define DTN /order order=internal noprint;
define STDTN /order order=internal noprint;
define ENDTN /order order=internal noprint;

As I understand, It considers observations where ENDTN=0 as missing and doesn't add them to report. But why? They are not missing, they're=0. And then if I use missing; option it adds those observations where ENDTN=0 but they are at the end of subgrup and are not correctly sorted by DTN STDTN. I tried to replace 0 with 1 to test it. But result looks similiar to result with missing; option. Can someone explain how it works and how can I get the desired result.

0

There are 0 answers