Thanks a lot! It seems like finally iSeries shops have to learn the 
concept/requirement of a DBA.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] 
On Behalf Of Hauser, Birgitta
Sent: Friday, September 09, 2005 12:24 AM
To: 'Midrange Systems Technical Discussion'
Subject: AW: SFL Load - SQL vs. LF

Hi,

>>Is there anyone who can explain this? 
>>Data Validation code!  
>>Or point to the original article?

Data Validation: Just try the following:
1. CREATE a physical file with fixed format, without DDS
   CRTPF FILE(MYLIB/BASEPF) RCDLEN(50)

2. Fill it with some information as follows:
   123456789XXXX        
   555666777ABCXXXXX    
   998877665BCF         
   L­JRWE1234567   

3. Create a DDS described file where the first field is packed numeric.
   Example:
   A          R BASEDDSF                                          
    *                                                             
    * FELDER                                                      
   A            FLNUM1         3P 0       COLHDG('NUMER.FELD 1')  
   A            FLNUM2         6P 3       COLHDG('NUMER.FELD 2')  
   A            FLALFA        15A         COLHDG('ALPHA FELD 1')  

4. Copy File 1 (BASEPF) into File 2 (BASEDDS) as follows:
   CPYF FROMFILE(MYLIB/BASEPF)  
        TOFILE(MYLIB/BASEDDS)   
        MBROPT(*REPLACE)        
        FMTOPT(*NOCHK) 

5. If you look into your file BASEDDS with WRKF, 
   you'll see all 4 records copied.
   The joblog also confirms that all records are copied.
   If you try to read this file, i.e. with RPG you'll get an error, 
   With record 4 because it contains invalid data.
   The date validation does not happen if a record is written (CPYF)
   But if the record is read.

6. Create a table with SQL that has the same description as BASEDDS
   CREATE TABLE MYLIB/BASEDDL (                
                FLNUM1 NUMERIC(3, 0) NOT NULL DEFAULT 0 ,       
                FLNUM2 NUMERIC(6, 3) NOT NULL DEFAULT 0 ,       
                FLALFA CHAR(15)      NOT NULL DEFAULT '' )

7. Try to copy file 1 (BASEPF) into file 3 (BASEDDL) 
   like you did it with BASEDDS file.
   CPYF FROMFILE(MYLIB/BASEPF)  
        TOFILE(MYLIB/BASEDDL)   
        MBROPT(*REPLACE)        
        FMTOPT(*NOCHK)      

8. If you check the joblob, you'll see that only 3 records are copied
   While the last one is not inserted, because it contains invalid data.
   That means data validation happens when a record (row) is written to
   A SQL described table.
   On the other hand, you can read all records in BASEDDS with SQL, because
   No data validation takes place.

If you compare the number or read operations with the number of update/write
operations, you'll agree, that you can gain performance by simply defining
physical files (Tables) with SQL instead of DDS.

Birgitta
       
                  

Mit freundlichen Grüßen
 
i.A. Birgitta Hauser
 
LUNZER + PARTNER GMBH
Unternehmensberatung
Carl-Zeiss-Straße 1
63755 Alzenau
 
Tel:         + 49 6023 951-255
Fax:        + 49 6023 951-111
Internet.  www.lp-gmbh.com
              www.rpg-schulung.de
 
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Mohammad, Tanveer
Gesendet: Donnerstag, 8. September 2005 20:11
An: Midrange Systems Technical Discussion
Betreff: RE: SFL Load - SQL vs. LF

Is there anyone who can explain this? Data Validation code!  Or point to
the original article? 

Thanks 
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of DeLong, Eric
Sent: Wednesday, September 07, 2005 4:22 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: SFL Load - SQL vs. LF

IBM has changed the data management rules for files created via DDL,
which
effective improves DB thruput for all applications using the file.
Performance gains come from where IBM has chosen to implement the data
validation code.  Under DDS rules, data is validated when it is read
from
the disk, where DDL moves the validation to DB writes and updates.

The theory is that a typical application will read data much more than
it
writes data.  If we validate on write, then we've reduced IO overhead.

iSeriesNetwork had an article about this.....

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-297-2863 or ext. 1863



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of James H H Lampert
Sent: Wednesday, September 07, 2005 1:09 PM
To: Midrange Systems Technical Discussion
Subject: Re: SFL Load - SQL vs. LF


Billy Rowe <billyrowe@xxxxxxx> wrote:
> No matter which presentation method you decide to you, 
> definitely create the tables/indexes/views with SQL.

Why?

--
JHHL
(who is much more fluent in DDS and OPNQRYF than with SQL)

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.