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


  • Subject: RE: Unix API read()
  • From: Anton Gombkötö <gombkoetoe@xxxxxxxxxx>
  • Date: Thu, 28 Dec 2000 17:33:34 +0100

At 08:57 28.12.00 -0700, you wrote:
>I think that strtok wants a delimiter list containing blank, comma,
>parenthesis, and so forth.  Parsing a database record where a character
>column might contain any or all of those delimiters or no delimiters at all
>might be unreliable.

Yep.

But i think his problem is the %TRIM. See Scott Klement's post from Dec 
26th, 15:57 (-06:00 from UTC).

So he should be happy with strtok and the CRLF delimiter for the records.

The described technique is quite interesting, although i'd change the 
parameters for the functions. (e.g. EVAL numvalue1 = 
GetIntField(PtrInputBuffer), just personal taste.) I do not see the reason 
for the length; a really smart "field sniffer" should handle data like

4711 My wonderful article .35
4712 The ugly one 1,234.56

as well. But that is a lot of work, and that only for a poor input file 
layout? One should have very good arguments to convince me....

Hopefully XML makes this all a lot easier. (But i cannot see a clear path 
for the "native" AS/400 programmer to XML. Everything seems to be based on 
Java.)

Richard, what i do not understand is your mail with "Perhaps one of the 
rocket scientists knows, I don't know." as an answer on his question on how 
to use the function. That was when i played the RPG-sorcerer card...



Mit freundlichen Grüssen / best regards

Anton Gombkötö

Avenum Technologie GmbH
Wien - Mattsee - Stuttgart
e-mail Office   :       mailto:Anton.Gombkoetoe@avenum.com
Homepage        :       http://www.avenum.com

Lest das Redbook / read the redbook "Who knew you could do that with RPG?":
http://www.redbooks.ibm.com/abstracts/sg245402.html

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.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.