Arrays in Qtp

Bruce Kent Bruce_Kent@bctm.com
Fri, 26 Mar 1999 09:49:56 -0800


Here is a quiz option that might work for you.  You could probably adapt
this to QTP.

First Create an indexed subfile with 30 records:

access <some file with more than 30 records>
set rep lim 30

define d_subscript num*1 = 1
define d_30_index char*2 = "30"

set subfile name thirty_rec index d_30_index segment d_30_index keep
rep summary d_30_index  d_subscript subtotal

Now you have an indexed subfile that looks like this.

	30	1
	30	2
	30	3
	...
	30	30


access RRR &
link ("30")  to d_30_index of *thirty_rec

define d_qualification char*5 = qualification(d_subscript)

select if d_qualification <> " "

set subfile name valid_qualifications keep

rep summary name d_qualification

Hope this helps....

Bruce Kent

> -----Original Message-----
> From:	Ray Bailey [SMTP:rayb@specialist.co.uk]
> Sent:	Friday, March 26, 1999 7:25 AM
> To:	Cognos Mailing List
> Subject:	Arrays in Qtp
> 
> VMS 7.1 P/H 710G & HPUX 10.2 P/H 7.33.d3
> 
> Picture the following
> 
> Record RRR layout
> 
> NAME        	Char*10
> QUALIFICATION	Char*5 occurs 30
> 
> I want to create a subfile holding one record per valid QUALIFICATION so I
> tried the following.
> 
> Access RRR
> 
> Subfile SUBFILE_NAME keep alias SUB_01 &
> 	if QUALIFICATION(1) ne " " &
> 	include NAME, QUALIFICATION(1)
> 
> Subfile SUBFILE_NAME keep alias SUB_02 &
> 	if QUALIFICATION(2) ne " " &
> 	include NAME, QUALIFICATION(2)
> 
> ~~~~~~~~
> 
> Subfile SUBFILE_NAME keep alias SUB_30 &
> 	if QUALIFICATION(30) ne " " &
> 	include NAME, QUALIFICATION(30)
> 
> 
> This seems to be okay with the subscript being specified on the IF option
> but not as part of the INCLUDE.
> 
> Does anyone know any way I can do this without having to define thirty
> items
> or creating a redefinition in the dictionary.
> 
> BTW I've allow tried it specifying "of RRR".
> 
> 
> Ray Bailey
> Leicester
> England
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> =
> 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.