On 20 Feb 2013 12:19, Glenn Gundermann wrote:
I have three AFPDS spooled files that I'm merging into one using
QSPGETSP and QSPPUTSP for each spooled file.

is it possible to add data to a user space using QSPGETSP and then
use QSPPUTSP just once?

Best I can tell, the Get Spooled File Data (QSPGETSP) API does not accept a start position, so there would be no capability to /append/ the results of consecutive requests. Seems each request to the API will have the output start writing from the beginning of the UsrSpc.

With the way I'm doing it today, I'm wondering if I need to clear the
user space between spooled files.
I'm not clearing it now and everything looks great to me but I'm
wondering if I'm doing it correctly. I don't want it to have
intermittent problems or to be broken in the future. I don't see
anything in the Information Centre.

An API that writes to a User Space will write whatever is relevant to the request; i.e. what is requested for output. Regardless of whether the existing space is cleared by the API is moot, because any data not overwritten was not returned by the API and thus should not be accessed except by an error in the navigation of the returned data, which would be a defect in the user program; or the returned data could falsely direct the user code to some residuals, which would be a system API defect. However I believe the issue of residual data is not an issue for at least the length of data returned for most APIs that write to a User Space, because I believe that most in fact will either clear at least up to that point, or will write every byte up to that point to ensure no residual data would remain in /gaps/ that the output-format would not overwrite. Thus I expect, that is why there is no problem as currently coded, and probably why not clearing would never become an issue.

Lastly, does anyone have code to change the page #s using a user

Would that be a question of the spooled data? If so, that would required a scan\replace of the data, which I expect requires knowing the layout of the data in a particular spool file for the best effect.?

This thread ...

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