MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » April 2014

Re: Spl2stmf and HPT



fixed

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






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact