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



Murali,

You can still use SQL on a flat file; you just have to use the SUBSTR function. 
I'm guessing your flat file has a single field that represents the entire 
record. If so, you can try

        UPDATE lib/YEXR
        SET field = SUBSTR(field,1,600)||'  '||SUBSTR(field,603) 
        WHERE SUBSTR(field,601,2) = 'AB'

In the above SQL statement, replace "lib" with the appropriate library name, 
and replace "field" with the name of that single field that represents the 
entire record. I would guess that the field name is the same as the file name 
(YEXR), but you can use DSPFFD lib/YEXR to check. Note that there should be two 
spaces between the quotes on the second line.

Good luck!
Richard


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Muralidhar Narayana
Sent: Friday, November 12, 2004 3:18 PM
To: midrange-l@xxxxxxxxxxxx
Subject: query on flat file


Hi
I have a flat file YEXR.
 
Some of the  positions from 601 column to 602 column in the file have got 
letters 'AB'
I want them to be replaced with  '  ' (i mean 2 spaces)..
Since it is not column oriented , Iam nt able to do SQL.
can some one advise how to go erase AB in some of the positions from 601 to 
602...
 
Thanks very much.
Murali.




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.