For such a simple example, PRINT would work fine. For more complicated examples (e.g. you want to the file to be csv delimited with quotations for strings etc.) you may need to physically add the header cases into the file (which would require converting the integers to strings) and then export the file using the usual means.
************************************.
DATA LIST FREE / X.
BEGIN DATA
0
1
0
0
1
0
0
1
0
0
0
1
END DATA.
FORMATS X (F1.0).
FILE HANDLE test /NAME = "C:\Users\andrew.wheeler\Documents\SPSSDocs".
DO IF $casenum = 1.
PRINT OUTFILE = "test\Test.txt"
/'[Target Info]'
/'Text1="Male"'
/'Text2="18-65 years"'.
END IF.
PRINT OUTFILE = "test\Test.txt"
/X.
EXECUTE.
************************************.