DEFINEFILE
From CometWiki
DEFINEFILE
Syntax: DEFINEFILE dictionary-file-name Placement: Place the DEFINEFILE command before the REPORT command. It can be useful when your PRINTER command directs your report's output to a data file and you wish to report on the data in that file. This command was introduced in version 8.00. Discussion: DEFINEFILE defines the file and all of its fields in your #CFILES dictionary. For example:
ERASE wrkfile,tmp
MARGIN 0,79
PRINTER wrkfile,tmp
DEFINEFILE my.work.file
INPUT customer
LINES 0
NOHEADINGS
SPACES 0
INDENT 0
REPORT
USING cust.to.hist
PRINT cust.number;cust.name;ar.activity;previous.ytd
When this report is run, a new file called wrkfile will be created in the TMP folder. It will contain all the records generated by the report. A new entry in the #CFILES Data Dictionary will be generated which describes that file. Its Reporter name will be my.work.file. The field names will be the same as the ones in the original files.