View previous topic :: View next topic |
Author |
Message |
sudoku Beginner
Joined: 14 Aug 2006 Posts: 10 Topics: 4
|
Posted: Mon Aug 14, 2006 7:32 pm Post subject: FTP Design problem |
|
|
Hi,
I have a requirement to FTP GET files from PC to mainframe. I need suggestions on the JCL.
Filename from PC side will have a 10 digit random number on xxx and
timestamp on yyy.
Eg: systemxxxxxxxxxxclmYYYYYYYYYYYYYY.txt
My problem: I don't know the .txt filename on the host side and need to do the following
1) Start a FTP receive job as soon as a file is placed on ftp server
(Trigger can be designed using CA-7)
2) Get the filename of the txt file (needed to send an acknowledgement).
3) Rename the txt file on host to .old
Any response is appreciated.
Thanks,
Sudoku |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
dz Beginner
Joined: 02 Apr 2006 Posts: 26 Topics: 0
|
Posted: Tue Aug 15, 2006 6:39 am Post subject: |
|
|
Alternatively, you could try this procedure: use LS -ALR command, write output
of this FTP to a file , interrogate this file in another program. If file name is found,
create FTP card to GET file, and second card to rename the file. Then, run the 2nd FTP step |
|
Back to top |
|
|
sudoku Beginner
Joined: 14 Aug 2006 Posts: 10 Topics: 4
|
Posted: Tue Aug 15, 2006 11:58 am Post subject: |
|
|
Thanks Kolusu and dz!
dz: please suggest a sample control card code with LS -ALR command.
I feel with the LS I should be able to get the file names and then I can play with it.
Thanks,
Sudoku |
|
Back to top |
|
|
sudoku Beginner
Joined: 14 Aug 2006 Posts: 10 Topics: 4
|
Posted: Tue Aug 15, 2006 4:15 pm Post subject: |
|
|
One question I had was can I schedule a CA-7 trigger when a file name of the type: systemxxxxxxxxxxclmYYYYYYYYYYYYYY.txt is placed on the ftp server
Note: The xxx and yyy's are not know on the mainframe side.
Cheers,
Sudoku |
|
Back to top |
|
|
Steve Coalbran Beginner
Joined: 09 Mar 2005 Posts: 22 Topics: 0 Location: Stockholm, Sweden
|
Posted: Thu Aug 17, 2006 3:16 am Post subject: |
|
|
Not really relevant but the LS -ALR comment made me try this on my MSDOS window in FTP to the host and (OK the -ALR gets...
550 No data sets found.
...) but just an LS it nicely lists my datasets ( |
|
Back to top |
|
|
dz Beginner
Joined: 02 Apr 2006 Posts: 26 Topics: 0
|
Posted: Wed Aug 23, 2006 8:14 am Post subject: |
|
|
LS command example is just LS command on a separate line with parameters.
However, the implementation of LS command might differ depending on the
system. Also, command and parameters could be case-sensitive. You could also try
something like ls -lt. |
|
Back to top |
|
|
|
|