10.1 Introduction

The C/Base Report Writer generates reports from data stored in a RMS file. You can extract data from a file and print it in an easily specified format. This chapter gives the formal definition of the language used by the Report Writer. For help in writing report programs see Chapter 9, Report Writer Programming Guide.

Using the Report Writer is a two step process. The first step is to compile the text file program source and write the output to an intermediate file. The second step executes the intermediate file with the output written to the standard output file.

Since the Report Writer compiler reads standard text files, you can use any text editor supplied with the system to create report programs. The report program must follow a certain pattern:

FILE declaration(s)

FIELD declaration(s)

VARIABLE declaration(s), this may be omitted

MAIN procedure

PROCEDURE(s), this may be omitted

Within this pattern, the only variation allowed is to have the PROCEDURE(s) come right before the MAIN procedure.

The language of the Report Writer has a free format. This means that you can omit any blank in the syntax or replace it with several blanks, tabs, or newlines. The only exception is that when two words appear side by side some type of separator (blank, tab or newline) is required.

The following notations are used in describing the syntax:

[ ] Brackets indicate that the enclosed item may be omitted.

... Ellipsis indicate that the item immediately preceding may be repeated.