Hello @B_bonna and welcome to the SAS Support Communities!
First of all, thank you very much for providing test data in the form of a data step and your PROC LOGISTIC code.
When I run your code I get this output (showing only parts relevant for your question):
Model Information
Data Set WORK.HAVE
Response Variable var2
Response Profile
Ordered Total
Value var2 Frequency
1 1 2164
2 2 442
Probability modeled is var2=1.
Class Level Information
Design
Class Value Variables
var1 0 1
1 0
Analysis of Maximum Likelihood Estimates
Standard Wald
Parameter DF Estimate Error Chi-Square Pr > ChiSq Exp(Est)
Intercept 1 1.4170 0.0745 362.0330 <.0001 4.125
var1 0 1 0.3213 0.1046 9.4373 0.0021 1.379
Odds Ratio Estimates
Point 95% Wald
Effect Estimate Confidence Limits
var1 0 vs 1 1.379 1.123 1.693
This is consistent with your PROC LOGISTIC, CLASS and MODEL statements: Level '1' of variable VAR1 is used as the reference level and the probability modeled is that of VAR2=1. In particular, the odds ratio is exactly what you want (actually it's computed as (1240/218)/(924/224), of course with the same result) and it's also consistent with PROC FREQ output:
proc freq data=have;
tables var1*var2 / or nopercent norow nocol;
weight freq;
run;
Table of var1 by var2
var1 var2
Frequency| 1| 2| Total
---------+--------+--------+
0 | 1240 | 218 | 1458
---------+--------+--------+
1 | 924 | 224 | 1148
---------+--------+--------+
Total 2164 442 2606
Statistics for Table of var1 by var2
Odds Ratio and Relative Risks
Statistic Value 95% Confidence Limits
------------------------------------------------------------------
Odds Ratio 1.3789 1.1233 1.6927
Note that in your contingency table the variable names are exchanged. Also, replacing ref='1' with ref=first changes the reference level from 1 to 0 because "first" means the "first ordered level". Then you would indeed obtain the reciprocal odds ratio, i.e. 0.725.