[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftp_get local file question



Sender: "alan shore" <SHOREA@xxxxxxxx>

I've never had to get a G.D.G. file from a mainframe, but I have "put" a file as a G.D.G. from the AS/400 to the mainframe. Whan I look at the ftp print the name of the file WITH the generation number and the version number has been in there. (If my memory is correct - though they say thats the first thing to go - we no longer ftp to the mainframe)
Can you not test doing a get file.name(0) and pipe the ftp output to a print and see if the generation number appears in the report?

>>> Scott Klement <klemscot@xxxxxxxxxxxx> 11/05/02 11:52AM >>>
Sender: Scott Klement <klemscot@xxxxxxxxxxxx>


Rick,

I don't see how I could possibly know what the name of the file is
supposed to be on the local side of the connection.   I'm not quite clear
on what it is that I'm doing differently than IBM is.

The way FTP works is you send 'RETR <filename>' to tell the server which
file you want to RETRieve.  It then opens up a data connection, and sends
you the data that's in that file.   It does not send you a filename to
use, at least not in RFC 959.

Maybe you could try to figure out the correct solution, then e-mail
me a patch, so others could benefit from it?

On Tue, 5 Nov 2002, Richard B Baird wrote:
>
> Scott,
>
> I've got a situation where I'm doing a get to a banks ftp server, and I
> don't know what the file name is.  here's the situation:
>
> the directions given by the bank says to enter the command
> 'get file.name(+0)'
> and it will give you the latest incarnation of the file you wish - for
> instance, file.name.g0023v01    - they must use some sort of pre-processing
> program with the get command to achieve this result.
>
> so, i don't know what the file name will be, until after i retrieve it.
> looking at ftp_get code, as i understand it, if I don't specify a local
> file name, ftp_get will assume the remote file name, in this case
> 'file.name(+0)'
> - an invalid file name.
>
> if I do specify a local file name, I would have to rename it due to having
> and needing multiple versions of the file already on my server, but at this
> point, I don't know the file name I actually retrieved, but I do want to
> retain the bank's file name.
>
> you see my dilema?  If I use the ibm ftp client, everything is peachy, and
> i get the file name as it was intended (because I didn't supply a local
> file name)
>
> I would like for the remote server to name the file for me.  do you have
> any ideas on how to handle this situation using ftp_get? or maybe, is this
> a job for ftp_getraw?
>
> thanks,
>
> rick
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------