Question on counting control #'s
Nancy Tietz
ntietz@mcare.med.umich.edu
Thu, 28 May 98 09:31:00 PDT
Try this:
Quiz
>access A-DATASET
>define starter int size 4 = parm prompt "Enter starter number:"
>define counter int size 4 = 1
>
>set subfile name xxx keep
> report summary number starter counter SUBTOTAL
> go
> access *xxx
> define control# int size 4 = starter + counter - 1 ;minus 1 so it starts
with starter!
> rep number control#
>go
Enter starter number: 12
1 12
2 13
3 14
4 15
5 16
If you need it sorted, you may need to add:
>Sort on sort-key1 on sort-key2
> set subfile name xxx keep at sort-key1
> rep sum number starter counter SUBTOTAL RESET AT SORT-KEY1
I hope that helps!
Nancy Tietz
ntietz@mcare.med.umich.edu
----------
>From: powerh-l-owner
>To: 'POWERH-L@LISTS.SWAU.EDU'
>Subject: Question
>Date: Wednesday, May 27, 1998 4:43PM
>
>Good afternoon,
>
> I have a slight problem I was hoping someone could help me with.
>I need a list of numbers in a file and I need to assign each number a
>specific control number. I know what the beginning control number is and
>I need to increment it by one for each number and then write them both
>out to a subfile. number control #
> 1 0011
> 2 0012
> 3 0013
> 4 0014
> 5 0015
>I am running 7.29 on an HP3000.
>
>Thanks for your help
>Anthony
>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
>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.