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:
Tony Summers <[log in to unmask]>
Reply To:
Tony Summers <[log in to unmask]>
Date:
Thu, 10 Feb 2011 09:27:57 -0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (110 lines)
At our firm,  we wrapped up the calls to FTP inside a Cobol subroutine
(along with a command file that allows that subroutine to be invoked
directly from JCL).  

Very similar to Dave's approach - it builds a file which it passed to
FTP via STDIN.  The only difference is that it also analyses the STDOUT
for any errors as that's the "standard" for FTP.   

This subroutine even survived (with small changes) our migration to
Ordina's MPUX ontop of Unix.    Source code and sample command files
available on request (remove HP3000 from the subject line to avoid your
email being diverted out of my main inbox).  

And we have programs that transfer files up to our windows file system -
invoke FTP and if successful transfer purge the original file from the
HP (or, in some cases,  rename the file to a backup directory).   But
the purge or rename is something we do outside of the FTP processing. 

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
Behalf Of Dave Powell, MMfab
Sent: 10 February 2011 00:46
To: [log in to unmask]
Subject: Re: [HP3000-L] FTP Question - follow up

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

Then a clever/brave person might tack on a routine to say that even if
it failed, if FTPXFERFILES > 0, purge that many of your files.  If you
transferrred 3, purge the 1st 3, etc.
I haven't done that bit myself.  Here, any failure means retry from the
start.  And the only common failures are at ftp login time, where that's
what we want anyway.

----- Original Message -----
From: "Paul D. Christensen" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, February 09, 2011 15:26
Subject: [HP3000-L] FTP Question - follow up


> perhaps I should have asked more than just why the ";move" does not
work.
>
> what I am trying to do is to move several files from a directory on
the 
> hp3000 to another server and to purge the files after they have been 
> moved, so the next time my process runs
> it will not send those same files.  However I do want to ensure that
the 
> FTP actually did send the file - that's why I wanted to do the ";move"

> parameter.
> But if that does not work - what is the best way to only purge the
file, 
> only if the FTP actually worked.
> I was seeing in the documentation there is an exitonerror command - I
have 
> never tried using this - is that something that is issued once and
then is 
> good for the duration of the ftp process?
>
> here's what I am thinking of doing - if I can't get the "move" to do a

> delete
>
> exitonerror
> put FB021111 FB021111.txt
> :purge FB021111
> put FB021211 FB021211.txt
> :purge FB021112
> etc. etc. as many times as I have files in my group
>
> --
> Paul D. Christensen
>
> Osakis MN 56360-0369
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html * 

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

The contents of this email are confidential to the intended recipient and may not be disclosed. Although it is believed that this email and any attachments are virus free, it is the responsibility of the recipient to confirm this.

Details of Smith & Williamson group companies and Nexia Smith & Williamson Audit Limited and their regulators (where applicable), can be found at this URL

http://www.smith.williamson.co.uk/disclosure

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

ATOM RSS1 RSS2