#INCLUDE

Syntax

#INCLUDE filename_lit

Description

Includes an external source file in the SQR report specification.

You may want to keep commonly used routines in a single file and reference or include that file in programs that use the routine. For example, you might have a set of #DEFINE commands for different printers to control initialization, font changes, and page size declarations. You can reference the appropriate include file depending on which printer you want to use.

Include files can be nested up to four levels. Variable substitution scanning takes place before the #INCLUDE command is processed. This enables you to substitute all or part of the include file name at runtime, adding flexibility for controlling which file is included for the run.

Parameters

Parameter Description

filename_lit

A file name that is valid for the platform on which the application is to be compiled.

Example

The following example illustrates the #INCLUDE command:

#include 'gethours.dat'        ! Common procedure.
#include 'XYZheader.dat'       ! Common report heading for XYZ Company.
#include 'printer{num}.dat'    ! Include printer definitions for 
                               ! printer {num}, which is passed
                               ! on the command line:
                               ! SQR REP1A SAM/JOE 18
                               ! where 18 is the arbitrary number 
                               ! assigned your printer
                               ! definition file, 'printer18.dat'.
                               ! The report would contain the
                               ! command:  ASK num
                               ! in the SETUP section, preceding
                               ! this #include statement.