|
midrange-l-request@xxxxxxxxxxxx wrote: > 5. Automating Copy Stream Files (Andre Manriquez) > >So my questions are: > >1. Is there a way to tell the AS/400 copy all files, *all perhaps, within a >given directory to a file/lib/mbr?...perhaps to a lib only instead of to a >specific file and create the files dynamically based on names in the IFS? > >2. Thru a CL program is there a way to do something like read out all file >names within a directory and call the CPYFRMSTMF cmd for each file name?? > >I'm looking to automate these steps thru a CL and OS/400 scheduler. Any >thoughts or insight would be greatly appreciated. Andre, Though some robust ILE RPG (or other non-CL language) procedures may be best, given your stated requirements, it's not impossible though not for beginners. Two general solutions come to mind both relying on QShell functions. The first would essentially be a pure QShell script that listed the streamfiles and processed the list. It would form the CL commands to create any needed physical files and then CPYFRMSTMF into them. The second would issue a single QShell command something like: ==> QSH 'ls /ftpdir >/qsys.lib/worklib.lib/ftp.usrspc' Then it would use the QUSRTVUS API to retrieve streamfile names from the user space, create files as needed and run each CPYFRMSTMF. The QSH ls utility would need to have whatever the correct paths are plus the parms you need for whatever you want to select. Tom Liotta -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertechgroup.com __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.