|
Either using SQL's constraint or the ADDPFCST (if you're a glutton for punishment and want to have to break it up into multiple steps) will do. I was amazed that the S/36 IDDU and it's list of valid values was enforced in the S/36 equivalent of UPDDTA but it was dropped on the iSeries. IBM went to the Least Common Denominator syndrome. I've used the SQL's constraints on some files here. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com Tony Carolla <carolla@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 10/13/2004 06:22 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 CONSTRAINT DDS Equivalent 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.
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.