|
i've done this (in 3 steps) could easily turn this into a cmd with parms for file name,etc CHKOBJ OBJ(IFSDTA) OBJTYPE(*FILE) MONMSG MSGID(CPF9801) EXEC(CRTPF FILE(IFSDTA) RCDLEN(198)) CPYFRMIMPF FROMSTMF('/files/abc.txt') TOFILE(IFSDTA) MBROPT(*REPLACE) RUNQRY QRY(*NONE) QRYFILE((IFSDTA)) OUTTYPE(*PRINTER) FORMSIZE(66 198) can set any spool overrides you want before runqry with ovrprtf. jim franz ----- Original Message ----- From: <thomas@inorbit.com> To: <midrange-l@midrange.com> Sent: Monday, December 17, 2001 10:43 PM Subject: Re: Printing from the IFS Peter: On Sun, 16 December 2001, "Peter Dow" wrote: > I'm looking for a way to copy an IFS stream file to an AS400 spool file, I'd guess this is the basic problem; that is, what you want to do isn't what your command is written to do. > something like: > > CPY OBJ('/home/test/textfile.txt') + > TOOBJ('/QSYS.LIB/QGPL.LIB/PRINTER.FILE') Though you want to copy to a "spool file", the command tries to copy to a printer file -- not the same thing at all, eh? (I'm assuming PRINTER.FILE is a PRTF kind of file.) Naturally, the PRTF exists; and hence, the CPY fails as it always will when TOOBJ() exists: > This fails with CPFA0A0 "Object already exists". I'm not sure if any 'standard' command will be useful for this; I'd like to know if any work. I'd start with QShell utilities for quick stuff, likely with pr. Then I'd create my own procedure in order not to require QShell. Note that a streamfile can be CPY'd directly to a new *usrspc object, i.e., with extension .USRSPC, if the *usrspc doesn't exist. Unfortunately, due to the way audit bits are handled, you'll probably need *AUDIT special authority. (The reverse doesn't seem to be true.) This might be useful for an intermediate solution if you don't have immediate time for a true solution. Tom Liotta -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 Fax 253-872-7904 http://www.400Security.com ___________________________________________________ The ALL NEW CS2000 from CompuServe Better! Faster! More Powerful! 250 FREE hours! Sign-on Now! http://www.compuserve.com/trycsrv/cs2000/webmail/ _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.