Moving spool files round the system

0 pts.
Tags:
AS/400
Hi, I'm trying to find an easy way of moving large quantities of spool files around our AS400. We are currently using a program called Mastermind but frankly I think its probably one of the worst pieces of software I've actually used. Could anyone give me some suggestions for an easy way of moving them around instead. I'd be happy to use CL but am not entirely sure as to the best way of going about this. Mostly this is just large no's of the same file that need moving to another queue in order to be datastored off the system, but some are mixed files needing to be moved to several other queues. Thanks in advance.
ASKED: November 29, 2005  11:40 PM
UPDATED: November 11, 2010  8:03 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

It depends on how you identify which spool files need to go to which output queue.

If you can determine which output queue is required just by looking at the spool file name, user ID and job name then you can write a CL or RPG routine to do:

a) CRTPF FILE(QTEMP/SPLF132) RCDLEN(132)
b) WRKOUTQ OUTQ(name) OUTPUT(*PRINT)
c) CPYSPLF FILE(QPRTSPLQ) TOFILE(QTEMP/SPLF132) SPLNBR(*LAST)
d) Read through SPLF132 and parse out the fields you’re interested in.
e) Using the fields, determine which output queue you want to transfer the report to and then use the CHGOUTQ command to move it.

If you need to analyse the contents of each report then there are additional steps of creating a second SPLF132 (or a SPLF198, etc) type of file and copying the identified spool file into that before reading it and analysing it.

If you want to copy the file to an output queue rather than move it, then use the SNDNETSPLF command to send the spool file to a “user” with the appropriate outq.

The whole process can be as simple or as complicated as you want to make it, and there are system API’s you can use to find various bits of information that you need.

All the best

Jonathan
www.astradyne-uk.com

==============================================================

Don’t spool reports of system info just to copy into a PF and read back into another program. Why do things the hard and unreliable way when easier and more reliable ways are available?

Just use the QUSLSPL API and process the list from the user space. If finer control becomes necessary, then move up to the Open List API for spooled files. Just start coding the APIs and ask questions as needed. More than enough help is available.

Tom

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • JohnAllen
    In addition to the option of writing your own program, enhancing it as new reports need to be moved, modifying it as needed (New OS version may require changes also) etc. You can purchase an inexpensive solution that works much better then the one you have today. For a couple thousands of dollars you can have a product that will not only manage your spooled files (move them around, distribute to multiple OUTQ's etc) but have the ability to convert reports to PDF and Excel. Just the ability to convert your Reports to PDF, placing them on a file server is worth the $2,000. Spooled files should not be left on your iSeries (or AS/400) for archiving purposes. This is way to risky and they are easily deleted (not to mention not backed up) There are several good product out there --sales stuff-- We have a product SpoolFlex, that will save you a lot of time, does much more then you want and starts at 1,800 If you want to take a look - www.drvtech.com John Allen --end of sales stuff--
    0 pointsBadges:
    report
  • DeadMeatinLA
    Since you are not apparently adverse to using "off the shelf" software... one product we have had great success with is called ESEND from Advanced Systems Concepts. Rules can be created to distribute various reports (and even down to various pages) to different output queues or email addresses and even in different formats like PDF, RTF, HTML, or XLS based on the name of the report, the user, the job, or even particular data on each page. The price range is similar to what the previous poster mentioned for the other product.
    0 pointsBadges:
    report
  • NetBoss
    I've done several things to accomplish this task. Each has worked well and could be useful to you, depending upon your requirements. 1. Use the MOVSPLF command in a CL (See previous post by other). Set it up as a scheduled job and everything works behind the scenes. 2. I've also used a native AS400 program called Save Output Queue by Worksright software, www.worksright.com. It is very configurable and allows you to save and restore spool files. SOQ is also designed to interface with several archiving / COLD systems. It is relatively inexpensive. I believe I paid under $700 a few years ago. You can get a free 30 day trial with full functionality and the people at Worksright are very helpful with any questions. 3. Another product that I have will also perform this function, though I bought it for another reason. It is called Catapult and can be found at http://www.excelsystems.com. This software runs native on the AS400 with a local interface for configuration. Jobs can be scheduled as needed. You can also download a free 30 day trial. Good Luck!
    0 pointsBadges:
    report
  • Happyjoe
    All the former replies are good. If you are just moving the spool files between output queue you can use the 1) movsplf for between outputq on same server, 2) SNDNETSPLF (APPC) must use a user account that is enrolled in the system directory and the spoolfile goes to the outputq of the user anywhere in the network. 3) LPR (TCPIP) sends a spool file to any outputq in the network without using a user. If you are actually wanting to move the report not between output queues but between systems. You have to convert the file to a flat file, the previous reply for ascii/ansi spool files works great, if the spoolfile is IPDS or any other binary print stream, use the GETSPLF command that is available on IBM's web site to put the stream in file or user space and then transport it with FTP or utility you want.
    0 pointsBadges:
    report
  • TomLiotta
    There is no OS/400 or i5/OS command named MOVSPLF, so that option is gone. There is, however, CHGSPLFA -- Change Spooled File Attributes -- and *OUTQ is simply an attribute of a spooled file from that perspective. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Note that you can also select large batches of spooled files in iSeries Navigator. Once selected, you can change the *OUTQ for all of them at once. Possibly faster, try lstsplf.exe or wrkprt.exe in the the Client Access directory of your Program Files. Create shortcuts to those (and a few others) on your desktop. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following