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



How about creating logical files, using the SST keyword? That way you also get help for record selection, if you index on one of the derived fields?

I don't think there is a way to get a DATE field this way, however.

HT
Vern

At 10:50 AM 8/1/2005, you wrote:

1. the file is on Iseries and is continously updated.

2. when I says "hundreds Sql" I mean each doing something like this:

select * from x,y where x.field1 = y.field1 and y.field2 in('01' '03') order by....

The point is that the "flat" file contains a lot of data very usefull to select records and I
don't want to substring all the times with hardocde positions.

Thanks in advance
Marco

--- phil Kestenbaum <pkestenbaum@xxxxxxxxx> wrote:

> Mario,
> 1. Are you importing the "flat file" into SQL and then querying it? or Are you setting it up as
> a linked server?
>
> 2. When you say "file with (hundreds) of sql." do you mean you have hundreds of "rows" of data,
> or is it sql statements (querys)
>
> Phil
>
> -----Original Message-----
> From: midrange-l-bounces@xxxxxxxxxxxx
> [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Marco Facchinetti
> Sent: Monday, August 01, 2005 9:11 AM
> To: Midrange Systems Technical Discussion
> Subject: Create View
>
>
> 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

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

Follow-Ups:
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.