<snip>
HelloI have a question that I hope some one can help with please.I have
written ILE RPG program application that use SCAN operation (15 times by
record) to re-format data. The record length is 350.

When It?s running in a terminal session or a batch job has high consume
of CPU(85%).

Anybody have an idea of how can I reduce consume of CPU?
</snip>

Don't use Scan. Scan just sucks up CPU. I worked on another system where
a vendor programmer wrote a program using scan again and again. It
literally would bring our entire system to it's knees. I ended up
working for the vendor and wrote a parser that could do the whole job in
a fraction of the second and used virtually no cpu.

I am not sure what it is you are trying to do but consider writing some
form of parser or tokenizer. If you just tokenizing a line of text, I
will be happy to send you code for a service program that does
tokenizing.

For example, if you have a line of text that is in some kind of cvs:

Value1,value2,value2

Maybe you could let us know what you are trying to do?


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.