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



>>Can someone point me to some resources that explain on how to create
>>views in DB2 and how to call them from RPG?
 
CREATE VIEW MySchema/MyView
    As Select Field1, Field2, ... FieldN
         From MySchema/MyFile
         Where IVCHK in (3, 5)
 
An SQL-View can be used in RPG like a logical file, but be aware, a view
never has a key.
If you need a predefined sequence, you have to use embedded SQL and add an
ORDER BY clause in your SELECT statement.
 
>>I'm still wrestling with this problem I had yesterday about retrieving
>>info.  Currently, the table is sitting at 2.9 Million records.  However,
>>within the records, there are only 218,000 that I need (I only need
>>records with an IVCHK status of 3 or 5).  I tried creating a LF only
>>using these records, but it was still slow.
 
>>Would creating a view based on a set of criteria speed up my process?
 
Creating a view will only speed up your process, if you have created the
right indexes.
 
The easiest way would be, to use iSeries Navigator.
Start iSeries Navigator, select database, select the library you need,
execute a SQL script.
Within SQL script you have a wizart for visual explain.
Execute your SQL statement interactively and analyze it with visual explain.
There is also a Index advisor, that will show you which index should be
created.

 

Birgitta

 


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.