DEFINEFILE

From CometWiki

(Difference between revisions)
Jump to: navigation, search
(New page: == DEFINEFILE == '''Syntax:''' DEFINEFILE dictionary-file-name '''Placement:''' Place the DEFINEFILE command before the REPORT command. It can be useful when your PRINTER command di...)
Line 1: Line 1:
-
 
== DEFINEFILE ==
== DEFINEFILE ==
   
   
-
'''Syntax:'''  DEFINEFILE dictionary-file-name
+
'''Syntax:'''  DEFINEFILE dictionary-file-name <br>
-
'''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.
+
'''Placement:'''  Place the DEFINEFILE command before the REPORT command. <br>
-
Discussion:  DEFINEFILE defines the file and all of its fields in your #CFILES dictionary. For example:  
+
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>
-
 
+
'''Discussion:''' DEFINEFILE defines the file and all of its fields in your #CFILES dictionary.  
-
 
+
'''For example:'''
-
ERASE wrkfile,tmp
+
ERASE wrkfile,tmp
-
MARGIN 0,79
+
MARGIN 0,79
-
PRINTER wrkfile,tmp
+
PRINTER wrkfile,tmp
-
DEFINEFILE my.work.file
+
DEFINEFILE my.work.file
-
INPUT customer
+
INPUT customer
-
LINES 0
+
LINES 0
-
NOHEADINGS
+
NOHEADINGS
-
SPACES 0
+
SPACES 0
-
INDENT 0
+
INDENT 0
-
REPORT
+
REPORT
-
USING cust.to.hist
+
USING cust.to.hist
-
PRINT cust.number;cust.name;ar.activity;previous.ytd
+
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.
+
When this report is run, a new file called wrkfile will be created in the TMP folder.<br>
 +
It will contain all the records generated by the report. <br>
 +
A new entry in the #CFILES Data Dictionary will be generated which describes that file.<br>
 +
Its Reporter name will be my.work.file. <br>
 +
The field names will be the same as the ones in the original files.<br>

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.

Personal tools