HP3000-L Archives

February 2011, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Paul D. Christensen" <[log in to unmask]>
Reply To:
Paul D. Christensen
Date:
Sat, 12 Feb 2011 10:18:06 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (56 lines)
I have seen this "echo" of commands in other processes and I've always 
wondered - what is the point of using the echo command?

I simply run the ftp as inline commands in my job stream

!job send,xxxx/password.xxxx, email
!ftp
open 209.xxx.xxx.xxx
user myname mypassword
cd in
put FB0686538 FB068538.txt;move
quit
!IF FTPLASTERR = 0 THEN
!    SET STDLIST=DELETE
!ENDIF
!EOJ

what is the advantage of using echo to build a file to input to the ftp 
process?


Dave Powell, MMfab wrote:
> The approach you try below might work, but any error will give lots of 
> MPE unknown-command errors.
>
> A common workaround is using the echo or print command to build a temp 
> file, then run ftp with that file as input.  With proper error 
> checking it should work.
>
> I have things working similar to the following
>
> !ECHO exitonerror >>  FTPI
> !ECHO {logon into} >>  FTPI
> !ECHO put file1.pub  file1.txt >>  FTPI
> !ECHO quit >>  FTPI
> !run ftp.arpa.sys <  FTPI
>
> Then later I do error checking a bit like
> !IF FTPLASTERR = 0 &
> !AND FTPXFERFILES = FTPREQFILES &
> !AND FTPXFERFILES = your-own-file-count
> !      all ok;  purge the files
>
>

--
Paul D. Christensen
16777 Cty Rd 4 - PO Box 369
Osakis MN 56360-0369
320-859-3477 - home
320-766-3067 - cell
952-767-4347 - work

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2