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



It really depends on what you're doing any why...

You can call the QSPOPNSP, QSPGETSP, QSPCLOSP APIs to read the spooled file directly. However, you should be aware that what you will get is actually the raw data in the spooled file. This will be in SCS, AFPDS, or even a user-defined ASCII format, depending on how the spooled file was generated -- but this will be the fastest way to read it. If you are just searching for a particular string in the spooled file, this should work fine.

The program you are looking at (SPL2STMF) does that, but then feeds the output into the host print transform API. The HPT API can be used to translate the spooled file into another format. This includes (with the proper WSCST) a plain-text format, which might be nice to have? But if you're just searching fro a string, it's probably overkill. The HPT function will require a lot more resources, and will slow things down quite a bit.

The CPYSPLF approach is faster than calling the HPT API, and will give you a plain text representation. It does not include empty lines, overprinting, et al, which might be a problem for you? Or it might not, depending on what you're doing. CPYSPLF will almost certainly run faster than calling the HPT function, however.

It all really depends on what you're doing and why... unfortunately, I don't know what you're doing, so I can't advise you further.


On 4/21/2014 1:46 PM, Jack Tucky wrote:
Definitely CPYSPLF would be easier. I'm trying to do this the API way which
is the right way I guess.

I don't need the STMF part of SPL2STMF, it's just the example I found and I
thought it would be easy enough to modify it.

If the only thing I want to do is look at the spool file with the API, do I
need to do any conversion to the data retrieved?

Jack


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.