I am new to stata and keep getting 'invalid syntax' for the following commad:

foreach diagnosis breast_cancer breast_surgery {
2. tab 'diagnosis' race_rec, col
3. tab 'diagnosis' ZIPINC_QRTL, col
4
. }

What am I doing wrong?

I've attached my dofile (not very long) and the dataset I am using.

Below is the question that requires an answer.
  1. Generate a cross-tab to examine the relationship between race [use your recoded race variable] and breast cancer surgery among your study sample of discharges with a breast cancer diagnosis. What is the chi-square and p-value for this association? How many and what proportion of white, black, and other race women with a breast cancer diagnosis underwent mastectomy?

Thank you for any help in advance.