× 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:Spooled files from 400 to 400
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Fri, 27 Mar 1998 17:33:23 -0500

>I need to move a spooled file from one 400 to another. No physical
>connection between two 400s, no dial up, only tape drives. Can I? How/why not?

/* On the source machine */
/* First, get some info about the specific print file */
/* WRKSPLF and press F10 to see detail */
                 File                                       
Opt  File        Nbr   Job         User        Number  Queue
     BLFM33         1  QPRTJOB     BUCK        051978  BUCK 

while you're at it, make a note of the attributes, too:
LPI, CPI, PAGESIZE, FORMTYPE, etc.  


/* Create an AS/400 file to store the report */
/* must be 1 column larger than your widest report */
crtpf qtemp/prt rcdlen(200) size(*nomax)

/* Copy the spooled file to a physical file */
CPYSPLF FILE(BLFM33) TOFILE(QTEMP/PRT) JOB(051978/BUCK/QPRTJOB) 
        SPLNBR(1) CTLCHAR(*FCFC)

/* Now that the spooled file has been copied to disk,*/
/* you can copy it to a tape...                        */
/* Use the CPYTOTAP command... */


/* On the target machine */
/* Create a matching PF */
crtpf qtemp/prt rcdlen(200) size(*nomax)

/* load the tape to disk */
/* Use the CPYFRMTAP command... */

/* Print the report */
/* Set up the printer file */
ovrprtf qsysprt ctlchar(*fcfc)           /* DON'T FORGET CPI, ETC!!! */

/* Print it out */
cpyf qtemp/prt qsysprt


You get the idea.  CTLCHAR(*FCFC) preserves your vertical spacing 
by storing space/skip information in the first column of the file.

The caveats:
You can't do IPDS or AFPDS printer files.
You'll have to keep track of "external" stuff like
FORMTYPE
CPI
LPI
PAGESIZE
etc... 
because none of this stuff is stored in the spooled file.

If you need to automate this, you'll be well served to use the
spool API's to retrieve a list of the spooled files, then
RTVSPLFA to save the attributes in an "attribute" file that
you also send to the target machine.  Your "restore"
process can then go to the "attribute" file and issue
the appropriate overrides.

There are products on the market that do this;
I wouldn't spend a gazillion hours developing an
automated method...  If it's a one-timer, you can live
with the hiccups in a home-grown solution.

Buck Calabro
Commsoft  Albany, NY

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 ...


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.