Subfiles and Subtotaling

Ravenscroft, Wanda L WandaL.Ravenscroft@Energizer.com
Mon, 22 Mar 1999 18:04:42 -0600


I have a subfile that I've created.  Following is an example of some data
that is in this subfile.

   SC    Type     PC   AC     Cost

   412   30917            A     4010813
   413   30917            A     9042253
   413   30917            A     4386797
   414   30917            A     5765510
   415   30917            A    22749072
   470   30917            A     7949987

The first column is what we call sales class and the last column is a cost
field.  As you can see, the value of 413 in column 1 is reported twice.  I
want to subtotal on the last column and report the value of 413 only once.
I should end up with:

   413   30917            A    13429050

When I report the cost column with the command subtotal on it, I get

   413   30917            A     9042253

Can anybody tell me what it is I might be doing wrong?  I do have this
working on another subfile and I don't appear to be doing anything
differently, but one never knows the little things that can go awry when it
comes to programming.  In case my sort makes a difference, I have it defined
as follows:

	Define SORT1 char*17 = Type + PC + ascii(SC)

PC as you can see is a blank in this case.

Any help that can be provided would be wonderful and very much appreciated.

Wanda Ravenscroft
Programmer Analyst
Eveready Battery Company
Open VMS 6.1, PH 7.10F1

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