HomeStartingEnvironmentDBMSVisualPQLProceduresSQLFormsHost/APIIndex
PQL Procedures homecontents start chapter top of pagebottom of pagenext page index Spread Sheet

SPREAD SHEET

The SPREAD SHEET procedure displays summary data in a format similar to that used by spreadsheets. This procedure does not produce an intermediate file, it writes directly to the SIR/XS spreadsheet interface.

SPREAD SHEET
         [ VARIABLES = varlist ]
         [ SORT      = [(n)]variable [(A)|(D)], ...]
         [ BOOLEAN   = ( logical_expression ) ]
         [ SAMPLE    = fraction]
         [ TITLE     = 'spreadsheet title']
VARIABLES Specifies the procedure variables to display. Specify the variables in the order in which they are to appear. If this option is not specified or the keyword ALL is specified, the default variables are output.

SORT Specifies the sequence of the output. therefore the spreadsheet rows are sorted.n is an integer that specifies the maximum number of records to be sorted. The default for this parameter is either the number of records in the database or the value specified in the sortn parameter and need only be specified if the number of records in the procedure table is greater than the default. The procedure table is sorted by the specified variables in variable list order. A variable name followed by (A) or (D) specifies that for that variable the sort is in Ascending order (the default) or in Descending order.

BOOLEAN Specifies which procedure table records are used by the procedure. The procedure table records for which the logical expression is true are used by the procedure. If this option is not specified, all procedure table records are used.

SAMPLE Specifies that a random sample of the procedure table records are used by the procedure.
The fraction specifies the percent of records used and is specified as a positive decimal number less than or equal to 1 (one). .25, for example specifies that a 25% sample be used.
TITLE Specifies a title for the spreadsheet.

Example

RETRIEVAL
. PROCESS CASES
.   GET VARS ID
.   PROCESS RECORD 1
.     GET VARS NAME GENDER SSN CURRPOS
.     PROCESS RECORD 2 WITH (CURRPOS)
.       GET VARS DIVISION
.       PERFORM PROCS
.       EXIT RECORD
.     END RECORD
.   END RECORD
. END CASE
SPREAD SHEET  VARIABLES = NAME GENDER SSN DIVISION
              TITLE     = "EMPLOYEE LOCATION TABLE"
END RETRIEVAL
The summary data is displayed as a spreadsheet which looks something like:

You can view, edit and save this data as text, html or in EXCEL® format.

homecontents start chapter top of pagebottom of pagenext page index