CHOOSE and SELECT in QTP

Chris Sharman Chris.Sharman@ccagroup.co.uk
Fri, 26 Jan 2001 12:22:17 +0000


>Using Quiz I can CHOOSE in two ways :-
>  a)  choose AcademicYear parm, CourseCode parm upshift, or
>  b)  choose AcademicYear parm range, CourseCode parm upshift.
>
>In case a) it needed <7 secs cputime & <1 min clocktime to retrieve
>the 1158 records;  but in case b) it needed > 5 & 1/2 mins cputime &
>over 26 mins clocktime.

RMS handles segmented keys by concatenating the segments together in order.
Case (a), it can obviously handle a specific key.
Case (b), say 96-98, a, it would have to start at 96a, and read through until
it got to 96b or whatever. It's then up to the application (in this case
Powerhouse) to decide whether to increment the 96, and start again from 97b
(effectively equivalent to (a)), or just to read through sequentially,
discarding until a match: effectively equivalent to 'choose academicyear 96
to 98 \ select if coursecode="a"'.
Your results would indicate that Powerhouse does the latter: probably easier to
implement. Whether the performance of the former gives a worthwhile benefit
would depend on the data: specifically whether the latter reads a lot of
unwanted records or only a few.

I guess you could put in an enhancement request to Cognos.
If you require a rapid solution, I'd suggest a workaround:

Do your range prompting in DCL, and then generate the individual values in DCL
(or quiz if you prefer), and then use 'choose ... systemval ...' to pass in the
generated values.

Oh, and a CC example for someone:

$ [quiz|qtp] cc=(something,whatever) ! set something & whatever
...
access myfile
@if something
choose mykey parm ; used if cc=something
@elseif anything
choose mykey parm range ; if anything (and not something)
@elseif nothing
def selval char*8 = parm ; if nothing (and not anything and not something)
select if mykey<>selval
@endif
rep mykey &
@if whatever
	mydetail1 mydetail2 &
@endif
	myval


Chris
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk		http://www.ccagroup.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.


-----------------------------------------------------------------------

Any views expressed in this message are those of the sender and not
necessarily those of CCA Group.  The unauthorized use, disclosure,
copying or alteration of this message is forbidden.  The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed.  Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.