The textReport.startReport() function passes control of the printing from the text report handler to the Java™ report engine. You must supply values for all arguments. Use the null keyword in any position where you want to accept the default value. These arguments override any default values, or values set by the constructor function (see Creating a TextReport variable.
The engine does not call any functions in the handler as a result of the textReport.startReport() function. Headers are printed as a result of calling the textReport.outputToReport() function (see outputToReport()).
The signature of the function differs slightly between COBOL generation and Java generation. For COBOL generation, the topOfForm argument is not used because you cannot send a report directly to a printer when you generate for COBOL.
textReport.startReport(
fileName STRING? in,
topMargin INT? in,
bottomMargin INT? in,
leftMargin INT? in,
rightMargin INT? in,
pageLength INT? in,
topOfForm STRING? in)
| Platform | Destination |
|---|---|
| z/OS® Batch, IMS™ BMP | A DD name defined in the JCL |
| CICS® | A transition file name |
| IMS/VS | A queue name |
The following example starts the report generation process, using default values for everything except the name of the output file and the top-of-form character (specifying the standard ASCII form feed character, 0x0C). Because the directory separator character on Windows is the same as the escape character in EGL, you must use a double backslash to separate directory names, or use a forward slash, which Java translates to the appropriate separator for the local platform.
myReport TextReport = new TextReport();
...
myReport.startReport("C:/temp/reportFile.txt",
null, null, null, null, null, "\u000C");