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



Brian,

The open(), read() and close() APIs are not part of C. They're Unix-type APIs -- part of the system-provided APIs. Not part of ILE C.

I strongly recommend against strtok() -- in most Unix and C environments, strtok() is considered deprecated. Consider using strsep() if you really need to use a C function for something as simple as tokenizing. You should have no trouble finding an open source copy of strsep that you can put on your system. If you can't, let me know and I'll show you where to find it.

Alternately, you might try taking 5 minutes and writing one in RPG. It's just not that hard. In fact, if you look at when we discussed this previously in this forum, you'll see that I wrote one called gettok() that I posted here. Took me 5 minutes, and was easier to use than from RPG strtok()



BMay@xxxxxxxxx wrote:
Generally speaking, I stick with the OPEN, READ, and CLOSE functions from C. As for the parsing, I am a big fan of STRTOK from C. Basically you pass STRTOK the string and the delimiters and and it passes back the chunks between the delimiters one at a time. You might want to check it out.

HTH,

Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi

Young i Professionals
http://www.youngiprofessionals.com


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.