MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP Design problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sudoku
Beginner


Joined: 14 Aug 2006
Posts: 10
Topics: 4

PostPosted: Mon Aug 14, 2006 7:32 pm    Post subject: FTP Design problem Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Mon Aug 14, 2006 7:57 pm    Post subject: Reply with quote

sudoku,

Check this link for an example for wild card file mget

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dz
Beginner


Joined: 02 Apr 2006
Posts: 26
Topics: 0

PostPosted: Tue Aug 15, 2006 6:39 am    Post subject: Reply with quote

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
View user's profile Send private message
sudoku
Beginner


Joined: 14 Aug 2006
Posts: 10
Topics: 4

PostPosted: Tue Aug 15, 2006 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message
sudoku
Beginner


Joined: 14 Aug 2006
Posts: 10
Topics: 4

PostPosted: Tue Aug 15, 2006 4:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Steve Coalbran
Beginner


Joined: 09 Mar 2005
Posts: 22
Topics: 0
Location: Stockholm, Sweden

PostPosted: Thu Aug 17, 2006 3:16 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
dz
Beginner


Joined: 02 Apr 2006
Posts: 26
Topics: 0

PostPosted: Wed Aug 23, 2006 8:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group