× 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.



Jim

I think this is a philosophical difference. EDTxxx are used at display time. SQL was never positioned as a presentation utility. This philosophical stance is seen in Query Management, e.g., where a QMQRY retrieves the data and a QMFORM formats it. These functions - retrieval and presentation - are combined in Query/400. The history of the 38/400, etc., could give some clue about this, I believe. RPG itself went down a different thought path than did SQL, both of which are IBM inventions. Different purposes, different tools, different ways of working.

It may be that attaching EDTCDE to a field was necessary before DSPFs were made external - or at least made it easier in those old days.

Can SQL define a column with pre-defined editing? Yes and no - you can do some parsing and editing with SUBSTR and CONCAT that will format things for you. Some of the date functions let you specify ISO, USA, etc., for formats. But these capabilities are beyond the original intent, as I understand it. Just get the data - a different layer in the app will present it.

Just some random thoughts.
Vern

At 05:10 PM 7/23/2004, you wrote:
   What about edit codes?  When using DDS you can tell the file what editing
   to use on a field.  We do a lot with Social Security numbers and have a
   system edit code setup to display correctly (999-99-9999).  When using the
   iSeries Nagivator to generate SQL statements I get warning/error messages
   such as;

   SQL150D   10   EDTCDE (EDTWRD) in column DBT_ORIG_BAL ignored.

   Can SQL define a column with predefined editing?  Sure saves a lot of time
   when doing adhoc queries, and works for date data types, dollar amounts,
   Social Security Numbers, and the like.

   Jim

   At 02:00 PM 7/23/2004, you wrote:

     Jim,

     You can emulate a field reference file using the WITH NO DATA clause.

     CREATE TABLE EMPLOYEE AS
     (SELECT EMPLOYEE_ID, NAME, etc. FROM FIELDREF)
     WITH NO DATA

     Not sure if it was V5R1 or V5R2 it was introduced.

     HTH

     Paul Tuohy

     >> Jim Essinger wrote

     The other thing that DDS _can_ bring to the table is using field
     reference
     files, if you design your files that way.  Not do-able in SQL if I
     remember right.

     Jim
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.