× 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: Executing remote commands in FTP
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Thu, 6 Apr 2000 18:43:04 -0500

Correct thou art.




timm@as400ftp.com on 04/06/2000 05:42:45 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: Executing remote commands in FTP

        Rob, I think you forgot a BINARY in there somewhere before the
put.
> Call the following CLP for each AS/400.
> OVRDBF INPUT TOFILE(myscript)
> FTP &REMOTE
> DLTOVR INPUT
> 
> The contents of myscript should contain:
> user myuserid mypassword
> quote rcmd CRTSAVF FILE(MYLIB/MYSAVF)
> cd mylib
> put mysavf
> quote rcmd RSTLIB SAVLIB(LIBTORST) DEV(*SAVF) SAVF(MYLIB/MYSAVF)  
> quote rcmd CALL LIBTORST/MYPGM
> get mysavf
> quit
> 
> The only problem is that if the program takes awhile to run then FTP
> might drop.  In that case you'll have to break up the script into the
> following:
> OVRDBF INPUT TOFILE(myscript1)
> FTP &REMOTE
> DLTOVR INPUT
> OVRDBF INPUT TOFILE(myscript2)
> FTP &REMOTE
> DLTOVR INPUT
> 
> 
> The contents of myscript1 should contain:
> user myuserid mypassword
> quote rcmd CRTSAVF FILE(MYLIB/MYSAVF)
> cd mylib
> put mysavf
> quote rcmd RSTLIB SAVLIB(LIBTORST) DEV(*SAVF) SAVF(MYLIB/MYSAVF)  
> quote rcmd SBMJOB CMD(CALL PGM(LIBTORST/MYPGM))
> quit
> 
> The contents of myscript2 should contain:
> user myuserid mypassword
> cd mylib
> get mysavf
> quit
> 
> 
> 
> 
> 
> DBale@lear.com on 04/06/2000 11:49:55 AM
> To:   Rob Berendt/DEKKO@DEKKO, cgalgano@ediconsulting.com@Internet,
> JFritz@sharperimage.com@Internet, townsend@patownsend.com@Internet,
> timm@as400ftp.com@Internet
> cc:    
> Fax to:       
> Subject:      Executing remote commands in FTP
> 
> 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
> +---
+---
| 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
+---


+---
| 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 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.