Thanks to all who replied. I was able to find the spot in the code where I
can see the spool data before the HPT code. I stripped out all the HPT and
Stream file stuff and I'm ready.
I also needed to strip out the characters like x'00' and others but I used
Xlate to do it.
Jack
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Monday, April 21, 2014 2:55 PM
To: Midrange Systems Technical Discussion
Subject: Re: Spl2stmf and HPT
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.