Understanding Compile Features

The following table lists SQR features that apply at compile time and their possible runtime equivalents. In some cases, no equivalent exists and you must work around the limitation. For example, you may have to use substitution variables with commands that require a constant and do not allow a variable. The topic “Writing Printer-Independent Reports” includes an example that works around the limitation of the USE-PRINTER-TYPE command, which does not accept a variable as an argument.

See Understanding the Sample Program for Multiple Reports and Understanding Compile Features.

Compile Time

Runtime

Substitution variables

Use regular SQR variables. If you are substituting parts of a SQL statement, use dynamic SQL instead.

See Improving SQL Performance with Dynamic SQL

ASK

INPUT

#DEFINE

LET

#IF

IF

INCLUDE

No equivalent

DECLARE-LAYOUT, margins

No equivalent

Number of heading or footing lines

No equivalent

DECLARE-CHART

PRINT-CHART

DECLARE-IMAGE

PRINT-IMAGE

DECLARE-PROCEDURE

USE-PROCEDURE

DECLARE-PRINTER

ALTER-PRINTER (where possible)