|
Hi Tom, Yes, I'm looking for the equivalent of CPYF filea QSYSPRT copying a physical file to a printer file to create a spool file. Not being a Unix person I tend to forget about QShell, but I think that will do for now. Can I direct the output to a particular queue using pr? Regarding user spaces, I don't know of any OS400 command that would print a user space, so I'd end up having to write something there as well. If I do write something, it might as well just read the IFS directly and write to a printer file. Thanks for the tips. Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax ----- Original Message ----- From: <thomas@inorbit.com> Sent: Monday, December 17, 2001 7: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. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
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.