|
On Sun, Apr 5, 2015 at 3:41 AM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
wrote:
But, if you did want to write your own, then you could do so. they aresimple
stream files stored in /www/YOUR-INSTANCE/logs. I would use the
fopen/fgets/fclose family of IFS APIs to read them, should be fairly
and fast. Then you'd need to parse the message and accumulatestatistics,
which might take a bit of coding -- certainly doable -- but here's whereI
think it might make a lot more sense to just grab an existing tool ratherthe
than write your own... it's not really difficult, just... why reinvent
wheel?
Well, I think finding an existing tool is definitely the best option.
But there are at least a couple of reasons one *might* want to
reinvent the wheel. One is if their needs are really, really simple.
It is sometimes the case that getting a Linux tool to run on the i is
not as quick and easy as one might think. There are times when
writing your own simple tool, that you understand how to make work, is
simpler than figuring out how to adapt a Linux tool, and learning how
to use it. Not saying this is the most common case, just saying that
it happens.
Another reason would be for your own education or fun. If you use a
modern scripting language instead of RPG, that can drastically reduce
the amount of coding and potentially increase the amount of fun. (I
wouldn't dream of doing this in RPG from scratch. If I already had
very high-level wrappers for the system APIs, I might consider it.
But even then, I think I would just go straight to Python.)
John Y.
--
This is the RPG programming on the IBM i (AS/400 and 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 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.