DEFINEFILE
From CometWiki
(Difference between revisions)
Line 3: | Line 3: | ||
'''Syntax:''' DEFINEFILE dictionary-file-name <br> | '''Syntax:''' DEFINEFILE dictionary-file-name <br> | ||
'''Placement:''' Place the DEFINEFILE command before the REPORT command. <br> | '''Placement:''' Place the DEFINEFILE command before the REPORT command. <br> | ||
- | 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. <br> | + | 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.<br> This command was introduced in version 8.00. <br> |
'''Discussion:''' DEFINEFILE defines the file and all of its fields in your #CFILES dictionary. | '''Discussion:''' DEFINEFILE defines the file and all of its fields in your #CFILES dictionary. | ||
'''For example:''' | '''For example:''' |
Latest revision as of 09:07, 6 June 2009
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.