Proc Freq

Page allows only one table per page.
Table: The variable before the '*' defines the rows of the table.
        The variable after the '*' defines the columns of the table.
Here are a few of the many table options:
    Chisq: Chi-square tests.
    Fisher: Fisher's exact test(2x2).
    Exact: Fisher's exact test(2x2).
    Chm: Cochran-Mantel-Haenszel.
    Cramv: Cramer's V.
    Norow: Suppress the row percentage.
    Nocol: Suppress the column percentage.
    Nopercent: Suppress the cell(rowXcolumn) percentage.
Don't forget your formats and labels.

Proc Freq Data=work.A Page;
    Table gender;
    Table gender*treatment / Chisq Exact;
    Format gender fgender. treatment ftreat.;
    Label gender='Gender' treatment='Treatment';
Run;