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




In response to your question, there are several reasons. The first, and
probably the most evident reason, is I need a better understanding of
working with the IFS.

But... you're working with standard libraries and objects through the IFS. You don't need a better understanding of those, do you? :)

The second reason is I have a utility that uses CPYTOIMPF to copy a PF
to a .csv file. It works pretty well except when the records in the file
contain quotation marks and commas. I'm sure you know that results in a
field being ended to early or essentially splitting a field up. I'm
working on something that will handle these characters when they are
encountered. Basically "prepare" the file before running the CPYTOIMPF
command.

Why not write the results to a stream file in the IFS and forego using CPYTOIMPF altogether?

If you do want to "prepare" a member so that it'll be okay to use with CPYTOIMPF, it'd be better to use the standard tools for working with members in a database, rather than using tools intended for stream files.

I figured using IFS files would be more dynamic than using RPG's regular capabilities.

Okay, I suppose that's true. Though, you could use the _Ropen(), _Rreadn(), _Rclose() APIs. These would be more dynamic, but still designed for working with record-based files.

I could just pass the library and file name as parameters and go from there. I've thought about using a program described file with 1 really big field and going that route,

That would also work.

but for no real particular reason I decided to try using IFS files first.

But you're NOT! You're using the IFS APIs, but you're not using "IFS files". You're still using the same old iSeries members that you've always used. The IFS APIs aren't really designed for that type of file -- they can access them, but it's a little bit awkward since it's not what they're geared up for.


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.