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


  • Subject: RE: Saving and restoring spool files
  • From: Evan Harris <spanner@xxxxxxxxxx>
  • Date: Tue, 13 Jun 2000 20:02:14 +1200

At 13:37 12/06/00 -0700, you wrote:
>Using APIs you can list all of our out queues to a file.  For each out
>queue, you can retrieve a list of all spool files.  You then, using APIs
>read each spool file and write to a physical file, saving the attributes.
>i.e. job name, number, user, spool file name, number, user data, ect.,
>deleting the saved spool files one by one.  Then using another API you can
>create new spool files on the new machine setting the attributes to what was
>saved from the Physical File that you saved/restored.  In theory this works,
>any one written it yet and care to share?


I've written this baby twice. The first time to transfer 40,000+ spool 
files for a CISC to RISC upgrade. I think I currently have source written 
to V4R3.

I could be convinced to post my code if there was somewhere appropriate to 
post it, but there might be quite a few bits and pieces because I think I 
based the program on some other spool file management utilities I developed.

I also found an off by one bug in an index I maintain to restore the spool 
files, but as long as the same version of the SAV/RST pair of commands is 
used it is not a problem - the bug works the same both ways :)

There are a few issues you need to be aware of to make this work:

When you restore spool files the original job details will be lost. You can 
get back the user name, but the job name and number will be replaced with 
QPRTJOB and a new number.

There is a limit to how many spool files you can save in one hit - 9999 if 
I remember correctly You will need to have some method to organise your 
spool files into groups of less than this. I can't remember whether my 
utility handles this limit gracefully or not when you initiate the SAVOUTQ 
command.

The method I used as I recall was to save the spool file attributes data 
into a physical file, one record for each spool file, and saved the spool 
file data into user space(s).

If anyone is really interested I'll dig out the source members and try and 
create some coherent documentation to tie it all together.

Then again, maybe Brad will rush this function into SPLTOOL ;)

regards
Evan Harris


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.