SecureUser
VERBatim - V86
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
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
QTIPS - Break-On Date Fields
IConvs / OConvs
Version 2
RTP Series - RTP19
VERBatim - V22
Reader's Clinic - Scaled Masked Decimal Conversions
VROOM - Window Processing II
Base Conversions
IConvs / OConvs
User Defined Conversions
@ATTACK - @Return.Value
QTIPS - DOS File Names
DOS Interfacing (Part II)
VERBatim - V116
@ATTACK - @Pri.File
@ATTACK - @Rollout.File
File Variables
How Indexes Are Updated
Index Record Layouts
QTIPS - File Variable of File In SELECT Statement
QTIPS - Amending non-Attached Files
LINEAR HASH FILE STRUCTURES - Part 1
Index Flush
QTIPS - File Handle Structure
RTP Series - RTP26
Base Conversions
IConvs / OConvs
User Defined Conversions
VERBatim - V126
Esc.To.Exit
Uncommon Knowledge - WC_WST_CHAR%
DOS Interfacing (Part II)
Reader's Clinic - Preventing Records Being Amended
How Indexes Are Updated
A RevTechie Replies - And Miscellaneous Jottings - Mike Pope - Revelation Technologies (UK) Ltd
Caching in on the Frames Array - Mike Pope
QTIPS - Improving the LH_VERIFY Window
SecureUser
VERBatim - V25
@ATTACK - @Files.System
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
REVMEDIA Revisted
Reader's Clinic - Different Id Same Record
Reader's Clinic - Scaled Masked Decimal Conversions
Base Conversions
User Defined Conversions
Reader's Forum - Numeric Precision in R/Basic - Hal Wyman
Simple Security
QTIPS - Hiding Symbolic Source Code
Using One Dictionary With Multiple Tables - Aaron Kaplan - SoftMart Inc
VERBatim - V16
@ATTACK - @Int.Const
@ATTACK - @Move.Keys
@ATTACK - @Priority.Int
@ATTACK - @Macro.Mode
Uncommon Knowledge - WC_Unkeys%
Utility Diskette # 3 - Part I
Utility Diskette # 4
Readers Clinic - Quickly Coping with \
@ATTACK - @CPU.Type
Version 2
QTIPS - Invalid Code and Command
Utility Diskette # 3 - Part I
QTIPS - Finding/Replacing Spaces With The Editor
Utility Diskette # 4
Playing with Scan Codes
QTIPS - Compiling Protection Code
QTIPS - Invalid Code and Command
QTIPS - Code/Command Help
Compiling 64K on a Shoestring by Blaise Wrenn (LexStat Systems Ltd)
QTIPS - Btree.Extract
Comp
Reader's Clinic - Removing "Searching Cross References" Message
@ATTACK - @List.Active
IConvs / OConvs
Reader's Clinic - Stop Lists
REVMEDIA Revisited
REVMEDIA Revisited
Version 3 Technical Highlights - Customising NewApplication Creation
REVMEDIA Revisted
Prompt Help
Reader's Clinic - Scribe Replace Processes in Window
Popups
Catalyst Tips
Readers Clinic - Quickly Coping with \
QTIPS - Skipping Prompts
Utility Diskette # 3 - Part I
RTP Series - RTP27
QTIPS - Printing Large Variables from the Debugger
VERBatim - V87
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.

RevMedia FKB

DocumentV2I5A4
TitleIConvs / OConvs
KeywordsICONV
OCONV
DATE
RLIST
BTREE.EXTRACT
WINDOW_COMMON%
TextThis article is to deal WITH the PROBLEMS encountered when mixing
application specific logic (such as fuzzy searches) WITH User Defined
ICONVs but before this subject can be dealt WITH it is necessary first to
consider how R/LIST processes fields WITH OCONVs

When R/LIST is asked to evaluate an = clause (WITH DATE = "14/05/87") it
knows (assuming that DATE has an OCONV of D2/E) that as an exact match has
been requested the value on file will not be 14/05/87 it will be the
internal representation of 14/05/87 7074 Subsequently it will ICONV
14/5/87 USING D2/E and use the value returned to compare against the value
on file (or on index)

If however R/LIST is asked to evaluate a ] clause (WITH DATE STARTS
"14/05") or another partial clause ([] or [) (again assuming that DATE has
an OCONV of D2/E) it will not be able to ICONV this data to compare against
file 14/5 does not ICONV correctly consequently it will have to read each
record FROM disk and OCONV each date to compare the beginning to the entered
value

When instead of a standard system conversion a User DEFINED Conversion
(UDC) is used on a dictionary item the author had always naively assumed
that as R/LIST ICONVed the data to compare WITH an = clause it used the
ICONV routine nominated on the edit pattern of the dictionary item This
misses the point of User DEFINED CONVERSIONS They are designed to cope with
both ICONVs and OCONVs R/LIST in fact CALLS the UDC contained on the OCONV
of the dictionary item PASSING it a type ICONV

With the introduction of UDCs came the capability to define "edit patterns"
(ICONVs) that not only checked that the data was valid but ALSO assisted the
user in finding a match for entered invalid data The most classic cases
involve ICONVs which if unable to find an exact match on a code file perform
a BTREE EXTRACT on the description

This is not the forum for a discussion of whether data (represented here by
the ICONV) ought to be mixed WITH the application logic (represented here by
the BTREE EXTRACT logic) The fact remains that many developers have created
these type of ICONVs and subsequently encounter PROBLEMS

Imagine a scenario where the ICONV takes an entered value and if not found
on the codes file looks at the name of the CURRENT prompt (in WC_SI%<2> of
WINDOW_COMMON%) to derive the popup to use for validation It then displays
a popup and prompts the user to choose the closest match The user does so
and the correctly ICONVed data is returned to the CALLING program This
works perfectly well in a window ENVIRONMENT but can CREATE very real
problems when USING R/LIST

If the user opts to LIST file WITH UDF FIELD = "FRED" where FRED is not a
valid option the logic described above will be called into PLAY The ICONV
logic will be called an attempt will be made to access the WINDOW_COMMON%
area to get hold of WC_SI% and an "Attempt to access Undefined Common"
message will be displayed as the system enters the DEBUGGER

Using the knowledge derived above this problem can be easily circumvented
Simply pass the UDC a flag in the optional branch telling it that it is
being called FROM an OCONV e g Oconv = [UDF OCONV] This branch will be
passed regardless of whether an OCONV or an ICONV is called It can thus be
tested for explicitly by the ICONV logic in determining whether to use
WINDOW_COMMON% (or any FORM of user prompting) or not e g

* rest of logic assumed to be above
ICONV:
RETURNED = XLATE("CODES" PASSED 1 "X")
IF RETURNED = "" THEN
IF SUBR LABEL = "OCONV" THEN
* Not in window don't lookup
RETURNED = PASSED
STATUS() = 1
END ELSE
* LOOKUP sets STATUS()
CALL LOOKUP(PASSED RETURNED)
END
END


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

Page last modified: 30/01/03