You should not make new variables with missing values. Presuming you have calculated the filter_$
variable that identifies the separate samples, for the continuous age variable you can estimate an independent samples t-test.
T-TEST GROUPS = filter_$ (1 0)
/VARIABLES=age.
For sex which is categorical, you can run a CROSSTABS
and calculate the chi-square statistic.
CROSSTABS
/TABLES = filter_$ BY sex
/STATISTICS=CHISQ.