View previous topic :: View next topic
|
Author |
Message |
ihatesugar Warnings : 1 New User
Joined: 22 Oct 2006 Posts: 43
|
|
|
|
Hi,
I have a requirement in which i need to pick up the files from a Folder & FTP to Mainframe. The files names have be picked up based on the timestamp. The customer would be sending the files suffixed with TIMESTAMP. The catch is the timestamp is not available for the Mainframe Job to pick this file, so i do not have the complete filename to FTP from Server to Mainframe.
We need to get into the folder and search for the latest files avaiable , say all the files for the day and send it to mainframe environment.
Please let me know if this can be achieved. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I see only three choices:
1. Everytime you connect to that FTP server, pull a directory listing, read the contents, compare against a known list of what files have already been processed, and build the statements to retrieve the new files.
2. This is how we used to have to do it. Pull all of the files everytime. Then, compare each dataset at your end against all of the other datasets you already have and discard any that are the same, keeping only those that you don't already have.
3. Whenever you pull a file, delete it from their server, if they provide DELETE authority. That'll prevent you from constantly pulling duplicate files. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Quote: |
3. Whenever you pull a file, delete it from their server |
Instead of doing delete - you can do RENAME the file to some other name and leave it in the server. |
|
Back to top |
|
|
sandeepc_savithri
New User
Joined: 25 May 2007 Posts: 10 Location: chennai
|
|
|
|
Hi superk
We have a exact similar requirement where we have to pull a directory listing from Secured File Server but the problem i am facing is the output file contains all the commands and other details then the File names are appended.
i have coded a Rexx program to take out this
would like to is there any otpion FTP program to get only the File names |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
sandeepc_savithri
New User
Joined: 25 May 2007 Posts: 10 Location: chennai
|
|
|
|
Thank you for the help |
|
Back to top |
|
|
|