A standard header should be used for every program. The purpose of the header is to identify the program and provide documentation including revision history. It provides the necessary information to a code reviewer to identify and understand the program and its development life cycle. Standardizing the header will allow the information contained in the header to be leveraged programmatically for things such as auditing, project documentation, macro and dataset use tracking, consistency checking, and revision history reporting. There are a number of existing version control systems available (see appendix A).
The template below presents an example for a SAS program, but the basic elements needed in a good header are generalizable to most types of programs. The elements included in a header will vary from organization to organization, but there are certain pieces of information which are recommended to be included.
Highly Recommended:
Identification of the project of which the program is a part
Program name
Author identification which should be human readable and unique
Date - convention used in different organizations will vary, so be clear as to what this date represents, for example date program initiated, date program passed final validation prior to database lock, etc.
Revision History
Recommended:
Brief description of the purpose of the program
All outputs generated by the program, including creation of files and/or modifications to files
Optional:
External files used such as datasets or databases that are used as data inputs to the program or macros used
Additional information for users which may include such things as usage instructions, macro parameters, or sample macro calls
Platform and operating system which the program was developed to run in
Software/programming language which the program was programmed in
Copyright information