|
Frankly I don't think a trigger would behave any different, and I think that a constraint would be a better performer. I've used both. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com T.Bryant@xxxxxxxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 10/13/2004 06:29 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Fax to Subject Re: CONSTRAINT DDS Equivalent What about a trigger program that validates the fields just before a record is written. This can take care of prompting the user for specific values if incorrect. When you need to change the specifics you only have to do so in one program. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy Bryant Analyst Programmer Patrick Autocare. Phone: +61 03 9926 9913 Fax: +61 03 9926 9977 Mobile: +61 0408 397 333 T.Bryant@xxxxxxxxxxxxxx I am in the process of building a new application, and I have a need to create some fields that must contain a certain list of values. I know that these files will be utilized by other programmers, and I would like to ensure, at the file level, that only certain values make it into these fields. I reviewed the DDS VALUES keyword for PFs, and it seems that this only helps when building DSPFs that REF the file. I am comtemplating creating these tables in SQL, and using the CONSTRAINT concept to block data being placed into this file that doesn't match the required list of values. This seems to work well, but I don't know performance-wise if this will cause slowdowns. I was wondering, am I missing something, or is there a way to create a PF using DDS (or Code Designer), such that only certain values are allowed into a field? Thanks! -- "Enter any 11-digit prime number to continue..." -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.