Hello @khalidamin,
If you just need a dataset containing class variable names and their reference categories (which you could then "interleave" with an odds ratio table where the reference categories are omitted), you can use the ClassLevelInfo ODS output dataset:
ods output ClassLevelInfo=cli;
proc logistic ...;
...
run;
data reflevels(keep=clvar value);
set cli;
if class ne ' ' then clvar=class;
if max(of x:)=0;
retain clvar;
run;
Alternatively, you could start with the OddsRatios ODS output dataset. But unfortunately variable Effect in this dataset contains concatenated strings like 'gender 1 vs 0' so that you would need to work with character functions such as SCAN to extract variable names and values. This might become difficult in general, e.g., if values (or even variable names) contain blanks or the substring "vs", etc.
... View more