SecureUser
VERBatim - V25
@ATTACK - @Files.System
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
REVMEDIA Revisted
Viewer
QTIPS - Aesthetically Improving RLIST Reports
Reader's Clinic - RList Column Names
VROOM - Window Processing II
IConvs / OConvs
Uncommon Knowledge - WC_Viewer_Env%
QUERY.SUB
Reader's Clinic
Reader's Clinic - Blank Column Headings in RLIST
QTIPS - Sub-Headings in RLIST (Revisited)
Spindex - A Review
BondTRV 2.0 - A Review
Spindex vs BondTRV
QTIPS - File Naming - RLIST Problems
Reader's Clinic - Suppressing Break-On Columns (Again!)
QTIPS - BREAK-ON Headings
QTIPS - Column Heading Limit
QTIPS - RLIST Average / Total Results
A RevTI Techie Replies - Mike Pope - Revelation Technologies (UK) Ltd
VERBatim - V126
Esc.To.Exit
Uncommon Knowledge - WC_WST_CHAR%
QUERY.SUB
QTIPS - Query Windows - Changing Colours
Readers Clinic - Quickly Coping with \
Window or Not ?
Vroom - Window Processing
QTIPS - Window Symbol Tables
VROOM - Window Processing II
@ATTACK - @HW
Uncommon Knowledge - WC_Reset%
Reader's Clinic - Related Windows
Window or Not?
Reader's Clinic - Scribe Replace Processes in Window
Soft Windows
QTIPS - Window Bug and Debugging Window Bug
Overlapping Windows And Window Menus
QTIPS - New Catalyst Option
QTIPS - Collectors on the fly
QTIPS - Blank Menus in Windows
QTIPS - Moving Objects the EASY way.
Version 3 Technical Highlights - Customising NewApplication Creation
SecureUser
VERBatim - V86
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
@ATTACK - @CPU.Type
Prompt Help
Reader's Clinic - Scribe Replace Processes in Window
Capture Playback and Convert.Keystrokes
@ATTACK - @Modal
QUERY.SUB
RTP Series - RTP42
VERBatim - V65
Argument passing - Subroutines and Functions - Mike Pope
QUERY.SUB
VERBatim - V2
Viewer
@ATTACK - @Browse.Mode
@ATTACK - @File.Error.Mode
@ATTACK - @Macro.Mode
QTIPS - Using INIT.VIEW with Printers
@ATTACK - @Scroll.Mode
@ATTACK - @View.Mode
QUERY.SUB
What's New (and un(der)documented!) In 2.12
A RevTI Techie Replies - Mike Pope - Revelation Technologies (UK) Ltd
Utility Diskette # 3 - Part I
Utility Diskette # 3 - Part II
VERBatim - V2
Viewer
@ATTACK - @Browse.Mode
@ATTACK - @File.Error.Mode
@ATTACK - @Macro.Mode
QTIPS - Using INIT.VIEW with Printers
@ATTACK - @Scroll.Mode
@ATTACK - @View.Mode
QUERY.SUB
What's New (and un(der)documented!) In 2.12
A RevTI Techie Replies - Mike Pope - Revelation Technologies (UK) Ltd
QTIPS - DOSTime
VERBatim - V11
@ATTACK - @Backgrnd.Time
@ATTACK - @Index.Time
QTIPS - Time-outs in Windows
Vroom
RTP Series - RTP32
Utility Diskette # 3 - Part I
Reader's Clinic - Page Marks in Windows
Argument passing - Subroutines and Functions - Mike Pope
Caching in on the Frames Array - Mike Pope
QTIPS - Fast Dynamic Array Building
QTIPS - Form Processor
QTIPS - Reusing Symbolics in Windows
Soft Windows
QTIPS - Query Windows - Changing Colours
Reader's Clinic - Template Name at Pre-Init
Caching in on the Frames Array - Mike Pope
Advanced Revelation Assembler Interface Module - Yves Pattyn, Technical Manager, Distribase, France
Reader's Clinic - Screen Width
Screen Grabber
Reader's Clinic - Slow Multivalued Screen Display
Utility Diskette # 4
@ATTACK - @Record
@ATTACK - @Reduction.Done
Collector Windows
Soft Windows
Reader's Clinic - Template Name at Pre-Init
REVMEDIA Revisted
Utility Diskette # 4
QUERY.SUB
Form.List.S
Make.Index
Index Sub Revisited
QTIPS - Make.Index 2.11+
QUERY.SUB
Version 3 Technical Highlights - Creating New Accounts Programmatically
Version 3 TCL Subroutines - Creating New Accounts
Version 3 TCL Subroutines - Creating Tables
Reader's Clinic - Incorrect Indexes
Vroom
RTP Series - RTP20
RTP Series - RTP12
Form.List.S
VERBatim - V5
@ATTACK - @Last.Select.Process
@ATTACK - @Save.Select
QTIPS - File Variable of File In SELECT Statement
QUERY.SUB
REVMEDIA Revisited
QTIPS - Extended Select Syntax
Spindex - A Review
Spindex vs BondTRV
REVMEDIA Revisited
QTIPS - Replacing GAS.BAR routine during PERFORM "SELECT"
QTIPS - Extended Select BY
QTIPS - EasyWriter
QTIPS - MFS - Select.Index

RevMedia FKB

DocumentV3I2A9
TitleQUERY.SUB
KeywordsQUERY.SUB
LCQUERY.MODE
CUSTOMIZE
QUERY
RLIST
MAKE.SELECT
DO.QUERY
TextJohn Parr of Progressive Computer Solutions in Basingstoke queried how to
get the system to produce RLIST sentences FROM stored data in the way
achieved by the query window Whilst investigating this it became apparent
that QUERY SUB (the routine used by the system to accomplish the \ Query
functionality) has application for all developers Its usage is therefore
covered in this article

Release 1 1 introduced "Query" technology whereby the user could type in \
at the key prompt and convert the window into a query window It also
introduced the frequently overlooked \\ which permits the user to call back
the set of parameters used in the last query operation modify and then
rerun them

COMMON /LCQUERY MODE/
There are a number of LABELLED common areas maintained by the system for its
own use As these are LABELLED common the developer has access to them
Query uses an area called LCQUERY MODE which has three VARIABLES associated
with it

COMMON /LCQUERY MODE/ FLAG OLD_QUERY TEMPLATE

FLAG This seems only to be set when the Query window is invoked
WITH a \\ at which time it will contain \\ It is
subsequently cleared down and will therefore normally appear
to be null

OLD_QUERY Contains the information making up the previous query in a
field mark delimited array WITH each element of the array
corresponding to a prompt on the window

TEMPLATE The title of the query screen WITH which the current
OLD_QUERY is ASSOCIATED

Thus without interacting WITH QUERY SUB at all it is possible for the
developer to affect what will be displayed when the user enters \\ Simply
load OLD_QUERY WITH the query to be performed in a LAYOUT corresponding to
the screen LAYOUT rather than the normal LAYOUT of @RECORD Thus if the
company name were the second prompt on the screen but field number four in
the CURRENT record to preset the query to look for all companies whose name
began WITH A OLD_QUERY would be loaded WITH @FM : "A]" and TEMPLATE with
the Query window title

QUERY SUB takes two parameters the first being a branch but the second
does not seem to be used The possible branch values are DO QUERY
CHECK REDISPLAY CUSTOMIZE MAKE SELECT and FILTER SAVE Those which the
developer can use are documented below


DO QUERY
Calling QUERY SUB WITH a branch LABEL of DO QUERY forces the window to enter
query mode automatically If the user selects any records USING query these
records will REPLACE the currently ACTIVE BROWSE list without
confirmation This can be used to great effect by the developer if it is
wished to reassign "Query Mode" to a SOFTKEY The softkey could simply call
a QUERY SUB PASSING it DO QUERY Note that as mentioned above if it is
desired to use the same parameters as previously in the query (perhaps on a
different softkey) the LABELLED common area FLAG must be loaded WITH \\
Note further that if a record is currently displayed in the window and new
records are chosen it is the job of the developer to UNLOCK the current
record The system will not do so


MAKE SELECT
This call is normally used to construct the RLIST sentence FROM the current
query window contents and to PERFORM the select STATEMENT thus constructed
returning an active select list However it can be used by developers who
wish to have the system construct RLIST statements for them FROM known data
and make an active select list The actual technique used is a little
cumbersome but effective

Essentially one needs to WRITE a PROGRAM that includes all of WINDOW_COMMON%
but dimensions the WC_W% array to as many fields are there are to be in the
select STATEMENT WC_W%<2> must be loaded WITH the DICTIONARY NAMES to use
and @RECORD must be loaded WITH the comparisons Then QUERY SUB is called
passing it MAKE SELECT and an active select list is returned To illustrate
this try out the CODE segment below


COMMON WC_SRC_FILE%
COMMON WC_SRC_DICT%
~~~~~~~~~~~~~~~~~~~~ Rest omitted for space
COMMON WC_W%(5)
~~~~~~~~~~~~~~~~~~~~ Rest omitted for space
CLEAR COMMON
WC_W_CNT% = 5 ; * Set to no of fields to query on
WC_W%(1)<2> = "F1" ; * field names
WC_W%(2)<2> = "F2"
WC_W%(3)<2> = "F3"
WC_W%(4)<2> = "F4"
WC_W%(5)<2> = "F5"
WC_DATAFILE% = "VOC" ; * filename
@RECORD = "VERB]" ; * comparisons
@RECORD<3> = "VERBS;BP"
CALL QUERY SUB("MAKE SELECT" "")
PERFORM "LIST VOC"


Examine the TCL STACK to see how QUERY SUB has constructed the select
statement

CUSTOMIZE
Customize is normally used within the query window to call the QUERY SELECT/
command window for customising RLIST SELECT and RLIST SORT It is possible
to define (in @ENVIRON SET<57> and <58>) a code and COMMAND to be called in
place of the customize window If this is DONE the select and sort
statement generated by QUERY SUB will be passed to the alternative routine
in @PSEUDO<1> and <2> respectively


Thus if it was required to generate the select STATEMENT BUT NOT run it the
code above would be used but WITH the following changes @ENVIRON SET would
be temporarily modified to call a routine to CAPTURE @PSEUDO QUERY SUB
would be called WITH CUSTOMIZE then @ENVIRON SET would be restored


(Volume 3 Issue 2 Pages 6 7)
[revmedia/copyrigh.htm]

Page last modified: 30/01/03