Question

  Asked: May 9 2008   5:38 PM GMT
  Asked by: AS400 - Ask the Expert


Copying or cloning spool files


AS/400, Spool files copy, Spool files

We have spool files that were created with overlays. If we try to duplicate the spool files (even on the same system), the copied spool files lose track of where the overlays came from. Is there a way to clone/copy such spool files without this problem?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



How are you duplicating the spooled files? It's likely that whatever method you use, the overlay information is not copied with the rest of the attributes.

You would, I suspect, have to use a CHGSPLFA command to add the overlay information back into the copy (FRONTOVL parameter).

You may be able to automate this by using WRKSPLFA on the original spooled file (output to a file), then read that file and get the overlay information, and then apply it to the copy using CHGSPLFA. However, I have not checked whether the file output from WRKSPLFA actually would contain the overlay information (we don't use overlays here).

Regards,

Sloopy

will add this. I use page segments and overlays all the time. I have found. When you copy a spool file that has a overlay and restore it to another machine. You must have the overlay in the same library on the new machine or else when you print the form. You will not get the overlay. If you move it to a new output queue on the same machine. You must still have the library that had the original overlay in it. Available when you print it. I hope this helps.

ALF
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Alf  |   May 12 2008  4:55PM GMT

I will add this. I use page segments and overlays all the time. I have found. When you copy a spool file that has a overlay and restore it to another machine. You must have the overlay in the same library on the new machine or else when you print the form. You will not get the overlay. If you move it to a new output queue on the same machine. You must still have the library that had the original overlay in it. Available when you print it. I hope this helps.

 

Globe user  |   May 12 2008  5:08PM GMT

Sloopy,

We hard-code the overlay name in the printer file DDS - one overlay to a printer file format. When we need the overlay, we just write the format to the printer file.

We actually have more than one overlay in a spool file, so we don’t use the front and back overlays.

 

TSCHMITZ  |   May 13 2008  6:52AM GMT

Hi Alf,

i have a piece of code (RPGILE SRVPGM) that duplicates spools using API’s. Only requirements, due the actual release of API’s, you must have an OS realease near mine (V5R4).
The goal of this program is to duplicate a spool file an patch some contents (I use it to insert COPY 1 to COPY 3) on the copied spool.
I assume it’s ok for overlay copy, but it should be tested.

If you are interested, tell me (i need your email). This is a bit sophisticated but i think understandable.

Thierry.