On Mon, 22 Sep 2008 20:14:11 +0200, Wolfgang Schäfer <[EMAIL PROTECTED]> wrote:
>Hallo Jürgen, > >probably the easiest way might be to generate a listing of the target >directory first, parse it and then find the newest file in the list ... > >/* rexx */ >/* assumes you have a NETRC file ... */ >queue "cd remotetargetdirectory" >queue "dir" >queue "quit" >call outtrap "ftpout." >address tso "ftp targethost targetportifneeded" >call outtrap "OFF" > >Then parse the output look for the youngest file, generate your GET commands >and connect again. > >Should be quite simple :-) > >Cheers >Wolfgang > >----- Original Message ----- >From: "Jürgen Kehr" <[EMAIL PROTECTED]> >Newsgroups: bit.listserv.ibm-main >To: <IBM-MAIN@BAMA.UA.EDU> >Sent: Monday, September 22, 2008 11:16 AM >Subject: Logic in FTP procedure > > >> Hello, >> >> I have a small problem with the following job: >> >> a FTP batch jobs runs on a daily base and it should pick up some data, >> which has the month and year of the preceding month in its name, for >> example in july 08 it may pick up the dataset XXX0608. >> This dataset is available around the 8th of july, but I don't know the >> exact date. >> I would like to build a procedure which check the actual date and checks >> if the latest dataset is available, if yes it should get this one, if no >> it should get the one from the preceding month. >> >> Thanks in advance for any help. >> >> -- I didn't see the original message. Another possibility is to use the new REXX ftp code. I think that it started in z/OS 1.8. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/f1a1d360/12.10 or http://tinyurl.com/4uxc9q ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html