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

Re: ftp_get local file question



Sender: "Richard B Baird" <rbaird@xxxxxxxxxxxxxxxxxxxxx>


Alan,

Thanks for the reply.  as far as GDG is concerned - i had no idea this was
a standard of some kind.  I thought it was a proprietary solution dreamed
up by bank or it's software vendor.

I think I know approximately which direction i will probably go to solve
the problem, but it's helpful to hash it out with someone else.

If I understand your suggestion, I can already find out the name of the
file names i've downloaded, after they've been downloaded - that's not my
problem.

My problem is that ftp_get makes you specify a file name, or else it uses
the remote file name (in this case, file.name.(+0) - which is invalid).  I
wanted the remote server to determine the file name, not to have to name it
before hand.

I can hard code for this particular peculiarity, but the trouble is I was
hoping to not have to.  I've written a generic ftp application that i'm
hoping will replace the need for any specific scripting for each of the ftp
jobs my client does.  so, i'm trying to come up with a more generic
solution.  I trying to avoid hardcoding a solution for a specific problem.

Plus, i don't even know when the numbers roll over - ie..  does G0001v01 go
to v02 thru v99 before it rolls the G0001 part?  and is it reliable?

I guess the solution is to actually do the (-x) GDG part myself, and
interogating the ftp_dir list to determine which file to recieve and
sending the full file name (local and remote) rather than sending the (+0)
or whatever to the remote server for it to decypher.

Is this some kind of ftp standard? or just IBM mainframes?

do you know of anything similar (but different) implemented by any other
ftp platforms?

What do you think?

Thanks,

Rick

-------------original message----------------
Sender: "alan shore" <SHOREA@xxxxxxxx>

Okay - let me take a shot at this.
Lets see if I understand your predicament
This file is coming from an IBM mainframe and the file is known as a G.D.G.
(Generation data group - I think). The suffix (0) means the latest, while
(+1) will mean the next and (-1) will mean the prior (-2) will mean the one
prior to that.
If I understand your predicament, specifying the file file.name(+0) now
will result in the file file.name.g0023v01, but the next time you specify
the file, this COULD result in file.name.g0029v02. In other words - no set
series of how the file name will result.
Could you not try something like
DSPOBJD OBJD(library/file.name.g*) OBJTYPE(*FILE) OUTPUT(*OUTFILE)
OUTFILE(QTEMP/name)
As the file.name.g????v?? will always increase in value for the latest
generation, the last record in this outfile will contain the name of the
latest file ftp'ed.
Hopefully, this will give you what you are looking for.
Good luck
Good hunting
Let me know how this works out

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