| 
 | 
I need to read a "flat" file with (hundreds) of sql.
The file is very simple:
A status field
A record type field
A key field
A data field
the data field is the problem since all RPG programs read it via external DS 
but of course Sql
cannot.
I'd like to define a view for each type of DS so I can use them freely via Sql 
without having to
hardcode positional substring in the statements.
Basically I know how to do it:
CREATE VIEW MUTABCAB0F (TACDCABINA, TADSCABINA, TADATARILA)
AS SELECT                                                 
SUBSTR(TBCDELEME, 1, 5) ,                                  
SUBSTR(TBDATITAB, 1, 50) ,                                 
DATE(SUBSTR(TBDATITAB, 51, 10))                            
FROM MUTABEL00F                                           
WHERE TBSETTORE = 'CAB'
The view is working but it's really poor since the fields generated are not 
referenced to the
original DS.
How can I mimic the LIKE statement of the CREATE TABLE on CREATE VIEW?
Thanks in advance
Marco
                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.