This is a schizophrenic command that controls two similar, but unrelated, things. SET HEADINGS determines whether column headings appear in the output of commands that list fields. It also determines whether TYPEing a file includes the name of the file and the date. Why are these things linked together? Who knows?
SET HEADINGS ON | OFF
cCurrentHeadings = SET("HEADINGS")In its first incarnation (column headings for listing commands), SET HEADINGS affects DISPLAY, LIST, AVERAGE, CALCULATE and SUM.
cOldHead=SET("HEADINGS")
SET HEADINGS OFF
USE Employee
* Rough average age
AVERAGE YEAR(DATE())-YEAR(Birth_Date) FOR NOT EMPTY(Birth_Date)
SET HEADINGS &cOldHead