|
Dan, You can easily execute a remote command using the "quote rcmd" syntax. For example, to create a save file named MYSAVF in library MYLIB you would use the following command: quote rcmd crtsavf savf(mylib/mysavf) This format can be used to execute any command that you are authorized to. So after creating the save file you can save objects to it, use GET to pull it to your AS/400, push a save file from your AS/400 to the remote AS/400, restore objects, etc. Following your example the FTP commands might look something like this: quote rcmd crtsavf savf(mylib/mysavf) quote rcmd savobj obj(file1 file2) lib(mylib) dev(*savf) savf(mylib/mysavf) get mylib/mysavf locallib/localsavf Before you can transfer a save file it must exist on the local or remote system. Otherwise the FTP server will create an empty physical file for you and this won't work for the save file. As you pointed out in your message you could also send a save file to the remote system, restore a program that does the tasks you want, and then pull the results. This is a pretty common task for our customers. The commands would look something like this: quote rcmd crtsavf savf(mylib/mysavf) put locallib/localsavf mylib/mysavf quote rcmd rstobj obj(*all) savlib(locallib) restlib(mylib) quote rcmd call mylib/mypgm get mylib/mysavf locallib/savf I can't speak for the others but you can definitely save the commands and re-use them for all 26 remote sites in our product. You can do that via our APIs (program calls and commands) or through our grouping function. This is common for customers who have branch offices or retail locations. The SAVxxx commands support compression with the DTACPR function. We also support Gzip and Zip compression in our FTP Manager product. You can contact me directly if you have questions about our product: 800-357-1019. Or more information here: http://www.patownsend.com. Patrick -- IBM AS/400 communications, FTP automation, and network security software and consulting services. http://www.patownsend.com "Bale, Dan" wrote: > > Gentlemen, > > I have taken the liberty of sending the following message (which was sent > earlier today to the MIDRANGE-L but has still not appeared) to you in the > hopes of getting a response before the end of today. If you should choose > to respond, of course I would ask that you send your response both to me and > to the list. Please forgive me in advance for choosing you to receive my > post twice (this one and the one sent to the list). You were chosen based > on FTP-related queries that you posted responses to. TIA. > > The original post: > > Forgive me for asking this because I know its been covered before... I know > I'd be able to find it in the archives but I don't have internet access here > (yet?). > > While considering options for this query, please keep in mind two things: 1) > I have to do this for 26 remote AS/400's and 2) this _should_ be a one-time > shot. > > How does one execute a command on the remote system in an FTP script? FWIW, > this is an AS/400-to-AS/400 session. Specifically, I need to 1) Create a > save file on the remote system, 2) Save two file objects to the save file, > and finally, 3) copy the save file to the source system (get ftp command). > > Alternatively (and preferably), I think I'd like to send a save file to the > remote system (without having to create it on the remote system first - how > is that done in FTP? How can I specify that a save file should be created > on the remote system when I use the SEND command?). Then do a RSTLIB from > that save file. Then execute a program that was in the library that was > restored. Finally, after the program completes (which will have > re-populated the save file I sent up), use FTP to GET the save file back to > the source AS/400. > > Finally, can compression / compaction be used on the SAVOBJ for the save > file that gets transferred back to the source AS/400? I thought I'd heard > before that comp* could not be used, although I'm not sure whether it was > specific to when the save file was file-transferred to a PC and then back > uploaded; things got garbled??? > > TIA, > - Dan Bale +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@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 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.