|
Thank you for the explanation. Did you get your problem solved? I did think of another case limiting RI. A package that uses multiple members. You can't put a constraint on a file with multiple members. Death to multiple members! DBale@TFSA.Textron.com on 03/08/2000 11:21:57 AM Please respond to MIDRANGE-L@midrange.com@Internet To: MIDRANGE-L@midrange.com@Internet cc: Fax to: Subject: RE: Join Logical like WRKQRY's join type '3' Good question. I think I have a good answer. The database in question is a "new business" database, keyed by customer ID and Item Number. A customer will inform us that they have a requirement for a new item. We need to enter this new item into the "new business" database so that we can do other things with it, but at that point, no record exists yet on the Item Master for this item. Eventually, an Item Master record is created, and the users want to be able to distinguish the "new business" items that are not yet represented on the Item Master from those that are. - Dan Bale -----Original Message----- From: Rob Berendt [mailto:rob@dekko.com] Sent: Wednesday, March 08, 2000 8:29 AM To: MIDRANGE-L@midrange.com Subject: RE: Join Logical like WRKQRY's join type '3' I am trying to step back and take a look at this. What is the point of trying to find unmatched records? Is this supposed to be an error condition, or is there a valid business reason for this? What I am getting to is this. If this is a brand new database, as you've said, then why are you not putting referential constraints on it to avoid unmatched records in the first place? Or is this a case of using a package master file, a custom detail file, and a concern about putting RI against the package file in case they do not trap for errors on the delete operation? My thought is this. Most packages do deletes against master files in only one program. Most of those use the record ID concept and then only do the hard delete during the end of month reorg. Basically this leaves you one program to check. DBale@TFSA.Textron.com on 03/07/2000 05:30:33 PM Please respond to MIDRANGE-L@midrange.com@Internet To: MIDRANGE-L@midrange.com@Internet cc: Fax to: Subject: RE: Join Logical like WRKQRY's join type '3' >>Use the file level keyword JDFTVAL to get a *PARTOUT partial outer join, then put a record selection test in comparing the item number field from the secondary file to blank. As long as you don't have any records in your primary file with a blank item number, then the only way for the join field in the secondary file to be blank is for it to be a non-existent record.<< This is exactly what I ended up doing as (at least) a temporary measure. Had to specify DYNSLT, though, and wondered if there are going to be performance implications. This is a brand new database, and it's too early to predict the volume and the percentage of records that will have an Item# that does not have a match on the Item Master. I have put comments in both the LF source and the RPGLE source (for which program is the only one using this file) warning about performance issues and the possible solution using SQL. - Dan Bale -----Original Message----- From: Shaw, David [mailto:dshaw@spartan.com] Sent: Tuesday, March 07, 2000 2:07 PM To: 'MIDRANGE-L@midrange.com' Subject: RE: Join Logical like WRKQRY's join type '3' > -----Original Message----- > From: Bale, Dan [mailto:DBale@TFSA.Textron.com] > > Thanks for all of the replies. (except Pat for the "MR" > solution -just > kidding-) Although, since the solution requires random access, "MR" > wouldn't have worked anyway. > > Three of you suggested SQL. Can I presume it can't be done > with LF DDS? Dan, I may be wrong, but I don't remember a way to explicitly define an *ONLYDFT or exception join in DDS. Having said that, I think that there's a way to cheat. Use the file level keyword JDFTVAL to get a *PARTOUT partial outer join, then put a record selection test in comparing the item number field from the secondary file to blank. As long as you don't have any records in your primary file with a blank item number, then the only way for the join field in the secondary file to be blank is for it to be a non-existent record. (Note: This assumes that blank is the default value for item number in the file.) I very vaguely remember doing something like this on the /38 back about '87, and I know I made it work before I was done, so I'd say it has a pretty good shot. I hope it helps! Dave Shaw Spartan International, Inc. Spartanburg, SC +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.