Distributing amounts to more than one record in QUIZ
Kim Williams
KWilliams@corp.ultratech.com
Thu, 17 Feb 2000 09:03:20 -0800
This is done without the benefit of testing against the actual files, but I think this works. The idea is that you get a total of quantity in the multiple inventory locations. Later when you subtract, if the answer is less than zero, just take zero.
ACCESS *S-FILE
SORT ON S-PARTNUM
REPORT SUMMARY S-PARTNUM S-QTY SUBTOTAL
SET SUBFILE AT I-PARTNUM NAME SUBX INDEX S-PARTNUM
SET REPORT LIMIT 999999
GO
;**************
ACCESS *I-FILE LINK I-PARTNUM TO S-PARTNUM OF *SUBX OPT
DEFINE QTY FLO SIZ 8 = I-QTY - S-QTY IF 0 < I-QTY - S-QTY ELSE 0
Kim Williams
Business Applications Manager
phone: (408) 325-6484
kwilliams@corp.ultratech.com
Ultratech Stepper
>>> "Boris Kortiak" <BKortiak@Genlyte.com> 02/17 8:24 AM >>>
Hi,
I'm running QUIZ on MPE/iX and can't figure out how to distribute amounts from a single input record to multiple matching records.
I have a subfile which is made up of S-PARTNUM and S-QTY. This matches to a inventory file which has a key of I-PARTNUM and I-LOCATION and an I-QTY field. What I need to do is reduce the amount in the S-QTY record by each I-PARTNUM, I-LOCATION combination.
Say in the first subfile record I have:
S-PARTNUM = "P" and S-QTY = 500
And the inventory has matching I-PARTNUM records of:
I-LOCATION = "L1" and I-QTY = 200
I-LOCATION = "L2" and I-QTY = 100
I want to report that I have a remaining quantity of 200 (S-QTY - (I-QTY(L1) + I-QTY(L2))
I also want to stop processing when the remaining quantity is <= zero and go on to the next subfile record.
Is this doable in QUIZ? Do I have do fall back to some 3GL?
Any hints greatly appreciated.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.