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



If you are going to manually do the deleting then the fastest and most
simple way to do what you describe is to:
1) open the file in Excel
2) highlight the row(s) you don't want.
3) press delete
4) save the file

Excel by virtue of the row matrix essentially move up all trailing records
(rows)

Access works too but a higher level of knowledge is generally needed. Much
harder to get a user to pick the job the next time around. I'm assuming a
user outside of IS is the end recipient of the .CSV file.

If the records you want to delete have a consistent definition, then after
you open the file with Excel:
1) click on Data, Autofilter
2) click on the column(s) to apply the filters . Use a filter that will
show the records you don't want.
3) highlight all visible rows.
4) press delete
5) unclick Autofilter to make the remain rows visible.
6) Save the file

An alternate use instead of deleting the visible records would be to cut the
highlighted records and paste them into another sheet. This assumes you want
to split up the records in the input file for whatever reasons.

If the file is big and the data is to be manipulated more than a little,
copying the file to a PC local drive would speed up working with Excel
considerably.

regards
Steve Moland

"Coyle, Stephen F." <SCoyle@xxxxxxxxxxxxx> wrote
in message
news:E0C9C9453C998A409C5DB00E93607301029150E6@xxxxxxxxxxxxxxxxxxxxxxxxxx
That's actually what I'm going to end up doing. I'll probably do it with
MS ACCESS though.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On
Behalf Of
eduard@xxxxxxxxxxxxxxxxxxxxxxx
Sent: Friday, June 01, 2007 4:56 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Deleting Records within a CSV file on the IFS

Steve,

Perhaps I'm a little to practical but.....
If the CSV file has one record format.
Why not get it into a real file File (CPYFRMIMPF).
Delete the records you do not want.
Replace the original CSV file with it (CPYTOIMPF).

Even if it is not an nicely formatted CSV this is still a possible way
but then using a flatfile and some record recognition.
This seems to me a lot more practical and easier than fiddling around on
the IFS itself.

We do not have to forget that we can do it in other way's.
Let's use these other ways and profit from it.

Regards,
Eduard.


----- Original Message ----
From: "Coyle, Stephen F." <SCoyle@xxxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries
<rpg400-l@xxxxxxxxxxxx>
Sent: Friday, June 1, 2007 4:10:07 PM
Subject: Deleting Records within a CSV file on the IFS


Hi All,

I've seen plenty of examples on opening, reading, writing, and
closing stream files on the IFS but I haven't seen anything on deleting
lines within the stream file.

Do I have to read the original file and write it back out
excluding the records I don't want? Or is there a better way?

Thanks for pointing me in the right direction....

- Steve


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






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.