× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: SQL...
  • From: "R. Bruce Hoffman, Jr." <rbruceh@xxxxxxxxxxxxx>
  • Date: Tue, 16 Nov 1999 11:31:00 -0500

This is the correct behavior, but of course one would think it wrong.

When you specify the VALUES clause in DDS for a physical file, those values
are NOT restricted on the physical file. They are ONLY restricted on display
files. So, when you use RPG and reference the field and put it on the
display, you are restricted. When you use DFU, it builds a display file the
same way, so you are restricted.

In SQL, the file does NOT have check constraints because of the DDS VALUES
clause, so SQL (like so many other tools that do not build a display from
the reference of the field) allows you to enter the wrong data.

If you have the latest versions of OS/400, you can apply check constraints.
If not, you can write before triggers to validate the data prior to
insertion.

===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified AS/400 Professional System Administrator
 -- IBM Certified AS/400 Professional Network Administrator

"The sum of all human knowledge is a fixed constant.
    It's the population that keeps growing!"

-----Original Message-----
From: Victor Rodrigue <vr19089@icil.co.in>
To: Sndjava (E-mail) <JAVA400-L@midrange.com>
Date: Tuesday, November 16, 1999 3:58 AM
Subject: SQL...


>Hello all,
>I have a physical file field with specific values specified. when i try to
>write any other value using DFU or RPG it gives me a
>run time error. But when i try the same using native SQL. the database file
>is getting updated.
>Any ideas why DB2/400 is allowing this without giving an error.
>regards,
>victor
>+---
>| This is the JAVA/400 Mailing List!
>| To submit a new message, send your mail to JAVA400-L@midrange.com.
>| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
>| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner: joe@zappie.net
>+---
>

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.