QUICK question on Select
Nancy Tietz
ntietz@MCARE.MED.UMICH.EDU
Thu, 20 Dec 2001 13:28:33 -0500
Thanks, Bob! That did the trick.
I was fussing over it so long I couldn't think on it anymore.
Have a great Christmas
Nancy
-----Original Message-----
From: Deskin, Bob [mailto:Bob.Deskin@cognos.com]
Sent: Thursday, December 20, 2001 1:12 PM
To: powerh-l@lists.swau.edu
Subject: RE: QUICK question on Select
I think you're problem is timing. The SELECT is done as part of the GET
process. You're setting up your temporary items after the GET is done, when
it is too late. Either embed everything in your select as in
108 SELECT CNTL-KEY[1:4] = "DQIP" AND &
109 CNTL-KEY <> "DQIPDATES" AND &
110 0 <> INDEX(UPS(CNTL-DESCRIPTION),TRU(UPS(T-SEARCH)))
or use a POSTPATH procedure to do the LETs.
Bob Deskin
PowerHouse Web Product Manager, Application Development Tools, Cognos Inc.
bob.deskin@cognos.com (613) 738-1338 ext 7268 FAX: (613) 727-1178
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA
-----Original Message-----
From: Nancy Tietz [mailto:ntietz@mcare.med.umich.edu]
Sent: Thursday, December 20, 2001 12:56 PM
To: powerh-l@lists.swau.edu
Subject: QUICK question on Select
I hope all the Quick/Qdesign programmers are not on vacation!
I want to be able to select records from a dataset where a literal is found
somewhere within one of the fields. The literal is to be typed in by the
user in the screen.
Here is a piece of the code. It doesn't work. It doesn't find any records.
(Of course I have records in the dataset that match "CODE" or other words.)
Once I added "TRU" in the Select statement, it doesn't even display all of
the records like it used to when I typed a Space in.
102 TEMP T-SEARCH CHAR*20 INI " " RESET AT MODE
103 TEMP T-SEARCH2 CHAR*20 INI " " RESET AT STARTUP
104 TEMP T-DESC1 CHAR*60 INI " " RESET AT STARTUP
105
106 FILE CONTROL-I1502F PRI OCCURS 13 TIMES CACHE 100
107 ACCESS SEQ REQUEST T-SEARCH
108 SELECT CNTL-KEY[1:4] = "DQIP" AND &
109 CNTL-KEY <> "DQIPDATES" AND &
110 0 <> INDEX(T-DESC1,TRU(T-SEARCH2))
111 ;** INDEX tells us if t-search is in cntl-description
....
195 PROCEDURE PATH
196 BEGIN
197 REQUEST T-SEARCH
198 IF PROMPTOK
199 THEN LET PATH = 1
200 IF PATH = 0
201 THEN ERROR "Please enter a DQIP search word."
202 END
203
204 PROCEDURE FIND
205 BEGIN
206 FOR MISSING CONTROL-I1502F
207 BEGIN
208 GET CONTROL-I1502F SEQUENTIAL
209 LET T-DESC1 = UPS(CNTL-DESCRIPTION)
210 LET T-SELECT-REPORT = CNTL-DESCRIPTION[60:1]
211 LET T-SEARCH2 = UPS(T-SEARCH)
212 END
Thank you for any help I can get.
Nancy
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender by
e-mail promptly that you have done so. Thank You.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.