|
There are several solutions. 1) 'Best' way. Keep your items in one file. Vendors in another. Third file is which vendors supply which items. This file would only have two fields: item, vendor. Create a key on this file unique selecting both fields, I don't care which field is first, selecting all records. Add another logical using the other order, again selecting all records. 2) If the gods have deemed that you cannot have a vendor/item cross reference, that you must keep a vendor number in the item master, then the following. The primary key on the file should be the item number, unique. Create one logical that uses the vendor#, then the item#, selecting all records. Use the SETLL function in RPG to position a subfile by vendor and display only that vendors item's. If the user doesn't want a subfile but wants to key the item number directly then use the primary key and if the vendor number ain't right then tell them so. Don't use separate logicals. LCobb@PapaGinos.com on 06/08/2000 02:16:10 PM Please respond to RPG400-L@midrange.com@Internet To: RPG400-L@midrange.com@Internet cc: Fax to: Subject: F Specs on an OVRDBF Salutations, I have a product master file (P701). I had to write the online maintenance in such a way that when the DP clerk selects product maintenance they are prompted as to which vendor they wish to do maintenance on. So only those products with that particular vendor code are accessible through maintenance. I created two logicals utilizing the select. One for each vendor. I know I can do it with BLDQRYSLT, but I prefer to try to utilize OVRDBF in my CLP. I have only been programming for a year. I am self taught and I want to get a better grasp on this OVRDBF. My boss allows me to learn everything I can, to try new approaches whenever possible, and get exposure on all that RPG, CL, and SQL has to offer. (RPGIV is coming soon). That is why I am choosing OVRDBF (if it is possible). My question is (because my boss is on vacation) what do my Fspecs need to look like? I have looked in all the manuals and infoseeker but I can't find this info. I am thinking my CL should be: OVRDBF (PFILE) TO (VENDOR CODE SPECIFIC LFILE) Should my Fspecs contain only the PFILE (update) or do I need the LFILE's(input) in there also? Am I even close with this? Am I wrong in thinking that it can be done this way? Thank you in advance for any info or insight you can shed on this matter. LAC +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.