Quick and Omnidex on entry.
georgia miller
georgia_miller@gfps.k12.mt.us
11 Mar 1999 09:41:24 -0700
Paul,
Here is how to get Omnidex to work with Quick. This is on an HP3000 with MPEix PH 7.29.C3.
I haven't converted my OMNIDEX stuff to PH8.19 yet. I know I have to upgrade to at least version 3.4.61E of Omnidex. The version I received from DISC is 3.4.63B.
Has anyone done this conversion yet? Was there anything I should watch for.
First you need these Temporaries:
;Omnidex Search Tempoaries
TEMP SEARCH-KEY CHAR*80
TEMP CRITERIA CHAR*80
TEMP QUALIFY-COUNT INT SIZE 4
TEMP MESSAGE CHAR*80
TEMP CONTROL-CMD CHAR*80
TEMP BUFFER CHAR*80
TEMP BASE-ID CHAR*5 RESET AT STARTUP
TEMP BASE-IDL CHAR*5 RESET AT STARTUP
The file must be accessed sequential:
FILE CUSSTOMERS PRIMARY
ACCESS SEQUENTIAL
Now the PATH Procedure needs to look like this:
PROCEDURE PATH
BEGIN
LET PATH = 0
LET CONTROL-CMD= "RESET(CUSSTOMERS)BASE "+BASE-ID+";"
DO EXTERNAL OMNIFINDCONTROL(CONTROL-CMD,BUFFER,MESSAGE)
;LOOKUP VIA CUSTOMER-NAME
REQUEST CUSTOMER-NAME
IF PROMPTOK
THEN BEGIN
;On the LET SEARCH-KEY command the manual show you can specify the database another way but this is the only way I can get it to work, is to hard-code the database password in th stmt.
LET SEARCH-KEY = &
"databasename/database_read_password.CUSSTOMERS.CUSTOMER-NAME(SORTED, BASE "+
BASE-ID+");"
LET CRITERIA = TRUNC(CUSTOMER-NAME) + ";"
DO EXTERNAL OMNIFIND(SEARCH-KEY,CRITERIA,QUALIFY-COUNT,MESSAGE)
IF MESSAGE <> ""
THEN ERROR = MESSAGE
ELSE INFO = "COUNT: " + ASCII(QUALIFY-COUNT)
LET PATH = 1
END
END
A FIND Procedure is not required
Also if you have accessed the same dataset any other way during the session of quick on other screens, you must have this reset stuff in the Initial Procedure. I always put it in to be safe:
PROCEDURE INITIAL
BEGIN
GET CUSSTOMERS SEQUENTIAL
LET CONTROL-CMD = "BASEID($LASTGET);"
DO EXTERNAL OMNIFINDCONTROL(CONTROL-CMD,BUFFER,MESSAGE)
IF MESSAGE <> ""
THEN ERROR = MESSAGE
ELSE LET BASE-ID = LJ(TRUNC(BUFFER))
END
Hope this helps!
Georgia Miller, Systems Analyst
Great Falls Public Schools
Email: georgia_miller@gfps.k12.mt.us
____________________________________________________________________
>To: powerh-l@lists.swau.edu
>From: Paul Kemner on Tue, Mar 9, 1999 9:29 AM
>Subject: Quick and Omnidex on entry.
>
>I'm having a problem with an Omnidex retrieval in Quick. We don't have a
>set of manuals since Omnidex was purchased with a 3rd party package.
>
>In the demo files, all the examples use a POSTPATH procedure, with code
>similar to this:
>
>REQUEST CUSTOMER-NAME
>LET CRITERIA=TRUNC(CUSTOMER-NAME)+":"
>LET SEARCH-KEY = "CUSSTOMERS.CUSTOMER-NAME;"
>DO EXTERNAL OMNIFIND(SEARCH-KEY,CRITERIA,QUALIFY-COUNT,MESSAGE)
>Etc etc.
>The omnifind procedure doesn't return a value as such, and I assume that
>the info gets put on a stack somewhere.
>
>I need to do the retrieval in an ENTRY procedure, and get a key value
>returned. Any ideas / sections of code that do this in Quick?
>
>Here are the records: ****************************************
>
>Record ORDERS (image master)
>Item ord-key (the image key)
>Item cust-id
>Etc.
>
>Record CUSTOMERS (image master)
>Item cust-id (the image key)
>Item cust-no (an OMNIDEX repeating key)
>Item cust-name
>Etc.
>
>And this is the screen: ******************************************
>
>Screen Test
>
>File ORDERS
>File CUSTOMERS designer
>
>Temp t-cust-no
>
>Field ord-key of ORDERS
>Field t-cust-no
>Field cust-name of customers display
>
>Procedure Entry
> Begin
> Accept ord-key
> Accept t-cust-no
>; If cust-no was a regular image key, I could do the following, but
>;as things are I get "No key/index is defined which matches these items"
>from QDESIGN.
> Get CUSTOMERS via cust-no using t-cust-no
> Let cust-id of ORDERS = cust-id of CUSTOMERS
> Display cust-name of customers
> Etc. etc.
> End
>
>It is my guess that I need to call some external procedure that would do
>the "Get CUSTOMERS" task.
>Do you have any code example for this?
>
>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
>Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
>powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
>This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.