Record count in Quiz

Mike Palandri palandri@4j.lane.edu
Wed, 27 Aug 2003 08:22:19 -0700


Thanks for all the tips.  I need the record count to sort on, so a summary 
operation such as count or subtotal won't help.

The problem is to read a record and save the value of one of the fields so 
it may be compared with another field in the next record.  This is to 
determine if the date range in the first record overlaps the range in the 
second.  I've been sorting on the record count in QTP in order to provide a 
break on each record...
SORT ON EMP-NO, POS-NO, DATE-PLAN-START, TI-REC-CNT


...then saving an end date field in a temp when the record count breaks 
(which it does on every record)...
ITEM TD-END-TMP = DATE-PLAN-END AT TI-REC-CNT RESET AT POS-NO


...so it can be compared with the start date in the next record:
DEF TC-DUP-FLAG   CHAR*01 = "Y" &
                   IF TD-END-TMP <> 0 AND TD-END-TMP >= DATE-PLAN-START &
                   ELSE ""

This tells me if the end date in record (n) is >= to the start date in 
record (n + 1), if so the range in the second record overlaps the range in 
the first, and it is written to a subfile to be reported in Quiz

What I am trying to do is make this a simple one pass Quiz.  I may as well 
keep the current  QTP method if I am going to be forced to use two passes 
and a subfile in Quiz.

I can see as I think through what I am writing here, that I would also have 
an issue converting the ITEM TD-END-TMP... statement to Quiz as well.

Perhaps it's just not worth the trouble.

Thanks again.



At 10:03 AM 08/27/2003 -0500, you wrote:
>You can't use temp's in quiz and you cannot reference the count function 
>directly.  You can however use a defined variable to do the same thing.
>
>ACCESS CUSTOMERS
>
>DEFINE CTR NUM*4 = 1
>
>REPORT SUMMARY CUSTOMER-NUMBER CTR SUB NORESET
>
>GO
>
>This will increment the CTR variable for each record complex.
>
>
>
>-----Original Message-----
>From: Mike Palandri [mailto:palandri@4j.lane.edu]
>Sent: Wednesday, August 27, 2003 9:42 AM
>To: powerh-l@lists.swau.edu
>Subject: Record count in Quiz
>
>
>Is there any way to get a hold of the record count in Quiz, so that its
>value would be 1 when the first record was read, 2 when the second was
>read, 3 when the third was read etc.?
>
>
>I am trying to convert a report based on a QTP to Quiz, and the technique
>used requires the record count.  This is done with temps in QTP, but I
>can't seem to come up with it for Quiz:
>
>TEMP TI-REC-CNT   INT*10
>
>[...]
>
>ITEM TI-REC-CNT = TI-REC-CNT + 1
>
>
>Thanks,
>
>
>Mike
>.
>
>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Mailing list: powerh-l@lists.swau.edu
>Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
>Unsubscribe: "unsubscribe <password>" 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.


Mike
.