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

Re: ftp_get local file question



Sender: "alan shore" <SHOREA@xxxxxxxx>

Okay - now I see your predicament.
This idea of G.D.G.'s has been used in some form or other on many different mainframe platforms (UNIVAC, ICL, BURROUGH's [I think], but this little piece of useless information does not help you.
usually, the generation number (the part after the g prior to the v [g0029v02.
means the 29th generation, 3rd version with 0 relative]) gets incremented with each new generation, the version number is usually 0.
But to get back to your predicament
Could you not ftp the file to a generic name
for example 
get file.name(0)  QTEMP/generic
then obtain the real name (file.name.g0035v00) from the ftp script and then copy the file as a version (unique) name 
for example
CPYF QTEMP/generic library/file.name.g0035v00
or something to that effect
Again
Good luck
Good hunting
>>> "Richard B Baird" <rbaird@xxxxxxxxxxxxxxxxxxxxx> 11/05/02 10:16AM >>>
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
-----------------------------------------------------------------------

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