Quiz Question

John Webster john.webster@cdp.co.nz
Fri, 28 Jul 2000 10:18:10 +1200


Here's a QTP solution:
> access *subfile
> sorted on seqno
> temp seq-count num*4
>
> item seq-count count reset at seqno
> define available char*1 = "Y" if seqno ne seq-count else " "
> subfile free if available = "Y" include seq-no
> item seq-count = seqno of subfile if seq-count ne seqno of subfile
> go

The secret is in the timing of the item statements.
It's probably possible in Quiz but with more effort.


--------
From:	Arnone, Anthony
Sent:	July 28, 2000 8:29 AM
To:	'powerh-l@lists.swau.edu'
Cc:
Subject:	Quiz Question

I have a question, I have a subfile of numbers sorted numerically. I need to
be able to read this file and print which number is the next available
number within the file. For example:

		001
		002
		003
		005
		006
I need to be able to say that 0004 is an available number. I am running ver
8.19 on an hp3000 MPE/iX. Thank you for your help.


			            R/S
			Anthony Arnone
			212.546.1603
			Aarnone@grey.com


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.