|
midrange-l-request@xxxxxxxxxxxx wrote: > 1. RE: Removing All Spool Files For A User (Dwayne Allison) > >date: Fri, 16 Sep 2005 07:34:30 -0500 > >All of the IBM command would work, if the spool file was not so big. The >system has to sort throughout the spool file before it can start deleting >them. In the process of doing this we get a resource error. So, we are >trying to create a program that will delete them one by one. Instead of a >person deleting them one by one. Dwayne: Been too busy to respond sooner... I think Rob Berendt was the first (maybe only) one to mention that you might need to use the Open List of Spooled Files (QGYOLSPL) API rather than QUSLSPL. That's because you're requesting a list that's larger than what can fit into a *USRSPC. You wrote "The system has to sort throughout..." and I can't tell if you meant that sorting was automatic or that you somehow wanted the list sorted. If you need the list sorted, you need to get all of the entries in one place and a *USRSPC won't do. You'll need to use QGYOLSPL to process the whole list and write the entries to something that can (1) hold all entries and (2) sort them. And maybe the sorting _is_ automatic based on your selection criteria. Now, I think you _could_ use QUSLSPL if there is no need to sort and all you're going to do is DLTSPLF. Consider requesting the list with QUSLSPL and understand that the list would be 'P'artial. The header for the list should have a 'P' in the 'Information status' field. You'd run through the list and issue your DLTSPLF for each entry. When finished, you'd again call the API and repeat the process. This second call wouldn't have to list all that were just previously deleted. When you finally got a list that was no longer 'P'artial, you wouldn't call the API again; you'd just delete those last items and exit. If you go ahead and use the more advanced Open List of Spooled Files (QGYOLSPL) API, I suppose it'd be easiest to write each entry to a physical file. You'd probably only write the fields that you needed from each entry. But because that makes each entry smaller, you might be able to fit the whole list into a *USRSPC yourself. Or you could create a *USRIDX that sorted in the order you wanted. Or... Anyway, it seems reasonable that your problem is based in the limit on the number of spooled file entries that can fit in a *USRSPC. I think it's somewhere around 190K entries. (I've only bumped into it once.) Tom Liotta
As an Amazon Associate we earn from qualifying purchases.
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.