Description

The processing module for OpenList queries RList takes the OpenList statement. The Report Designer uses RList to access data for queries.

Syntax

RList (statement, target, targetname, userarg, debugflag)

Parameters

The Rlist routine has the following parameters.

ParameterDescription
StatementTheOpenList statement to process.
TargetIf statement is a List statement, target is TARGET_PRINTER by default.

If statement is a Select statement, target is TARGET_SAVELIST by default.

TargetNameIf Target is TARGET_CALLBACK$ then targetName is the name of the callback function. If targetName is null or invalid, a loading error will occur.

If Target is TARGET_SAVELIST$ then targetName is the name to save the list to in the SYSLIST table.

UserArgIf Target is TARGET_CALLBACK$ then userArg accepts a string argument which will be passed to the callback function. If RList is called procedurally from another SSP userArg will return with the last value set by the callback function.

If Target is TARGET_SAVELIST$ then userArg accepts a description string to be saved into the header of the saved list.

DebugflagIf set, the RList output program is saved to disk as RLIST_OUT record in SYSOBJ and the query is not executed.
TargetIntegerDescription
TARGET_PRINTER$0Send output to default printer (currently only List).
TARGET_CLIENT$1Send output directly to the client (currently only List); no header/footer.
TARGET_UNUSED$2Not currently used.
TARGET_CALLBACK$3Call the specified callback function specified in targetname (currently only List). Callback function receives text typically sent to printer. Header, footer and column header data included.
TARGET_SAVELIST$4(Select only) Saves list to name specified in targetname and/or to rotating queue of 10 last Select queries not left active or latent.
TARGET_ACTIVELIST$5Resolve the list but do not save it to a named or default list. When RList returns, the list remains active. This is only useful when RList is called procedurally from another SSP.
TARGET_LATENTLIST$6Do not resolve the list unless absolutely necessary, and do not save it to a named or default list. When RList returns, the list remains active. This is only useful when RList is called procedurally from another SSP.
TARGET_CHECKSYNTAX$7Check the syntax of the statement and return status information but no not execute. For use by tools that allow users to enter query specifications.

Note: To check for an error from RList, use Get_Status. For more information, refer to Get_Status.

See also

Get_Status()ReduceSelect...By.

Example

From the command line:

run RLIST "LIST SYSPROCS JUSTLEN 50 WITH ALL [] '$insert' BY @ID", 1
* in a BASIC+ Function:
declare subroutine Rlist
equ TARGET_ACTIVELIST$ to 5
RList("SELECT SYSPROCS WITH ALL [] '$insert' BY @ID", |
      TARGET_ACTIVELIST$, "", "", "")
if Get_Status() then
Gosub error_processing
end
  • No labels