REPORT

Purpose

Writes user-specified text to a report file.

Syntax

REPORT ; {TO fname} {CLEAR | NOHEADER} @

REPORT {text | named_constant | macrostring }.... @

Arguments and Subcommands

text

Any text string (this string should be enclosed in quotation marks if it contains a semicolon).

named_constant

A named constant that will be evaluated and its value written to the report file. If the constant is undefined, the string will be written to the report file.

macrostring

One of several predefined text macros. These macrostrings begin with a dollar sign followed by up to seven characters. The macros that are currently available include: $DATE - the current date $TIME - the current time $NL - new line $NP - new page $T - tab character.

;

Indicates that this command defines a new report file.  This must be the first argument after the REPORT.

TO fname

The name of the report file. If this is omitted, the report text is written to a file called REPORT.TXT. By default, new results are appended to the REPORT.TXT file each time it is used.

CLEAR

Start writing from the beginning of the report file, instead of at the end as usual. Any data previously stored in this file is lost.

HEADER

Write a date/time stamp and information on the EPICURE module used to create the report to the report file.

NOHEADER

Do not write a date/time stamp and information on the EPICURE module when the report file is created.  This is the default behavior when a new report is created.

Remarks

The default report file is called sessname.rpt, where sessname is the name of the current session.   Unless the NOHEADER option is specified when the report is first created a time stamp and the name of the program being used will be written to the file. Unless the $NL or $NP macro is specified, all text generated by a single REPORT command is printed on one line.

The output text is case-sensitive. Except in quoted strings, consecutive spaces are reduced to a single space. The value of a named constant is written with five significant digits. Numbers included in a text string are written exactly as they are entered.  As noted in the description of the subcommands given above, if the first character after REPORT is ; any text following the semicolon is treated as subcommands and not written to the report file.  If you need to write a line with a single semicolon use the command REPORT “;” @.

Model parameter estimates and their standard errors can be written to a report file if they are saved as named constants created using the new AS #nc and SEAS #nc options of the PARAMETER command. Parameter estimates and standard errors are also saved as named constants (#_MLEST and #_MLESE, respectively) by the BOUNDS and PROFILE commands.

Output from the simple analyses and summary commands: CORR, COVA, FREQ, LINCOMB, MEAN, QUANTILE, RISK, and SUM, can be written to the report file using the new REPORT subcommand for these commands. The REPORT command is used in the following examples: VER2FEAT.GBO, LOOPTEST.PNT, and BRTHWGT.GBO.

Examples

a)  The following example illustrates the features of the REPORT command, including the use of macros.

REPORT REPORT command example $nl $nl @

REPORT Esophageal cancer analyses $date - $time @

REPORT $nl The value of the constant term is:

#conterm @

REPORT $nl $date $t $time @

The report file, which has the default name sessname.rpt,  contains the following lines:

Esophageal cancer analyses  October 23, 2011 - 13:40:53

The value of the constant term is: 4.3567

October 23, 2011 13:40:53

b)  Creates a report file called myrep.txt with header information (as described above).  If myrep.txt exists the header will be written at the end of the current file.

REPORT  ; TO myrep.txt HEADER @

c)  Creates a report file called myrep.txt with no header informaiton replacing any previous report file with the same name.

REPORT  ; TO myrep.txt CLEAR @

 

d)  REPORT  ; TO myrep.txt HEADER @