View previous topic :: View next topic |
Author |
Message |
cvidhya Beginner
Joined: 14 Dec 2002 Posts: 2 Topics: 2
|
Posted: Thu Jun 24, 2004 3:41 pm Post subject: FTP wildcard |
|
|
I have to take a filefrom Unix box in MVS using FTP and the file name is going to be filename_mmddyyhhmiss.txt. As I will not know the time, I want to use a wild card and say
mget filename_mmddyy*.txt 'DESTFILE' (Replace
will this work?
Is this the right way to use wildcard for FTP in MVS? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri Jun 25, 2004 5:04 am Post subject: |
|
|
Cvidhya,
The syntax looks ok. Why don't you run a test and let us know the results?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Thu Feb 24, 2011 3:52 am Post subject: |
|
|
Hi Kolusu,
I gave something like this ... It gives error that File not found
Code: |
MGET BNYMAMS_*_TRN_RQ.TMP 'STTEST.W.CBU.AMSTRN.ARVIND' (REPLACE
>>> PORT 172,28,241,31,57,173
200 PORT command successful.
>>> NLST BNYMAMS_*_TRN_RQ.TMP
150 Opening ASCII mode data connection for file list.
226 Transfer complete.
>>> PORT 172,28,241,31,57,174
200 PORT command successful.
>>> NLST 'STTEST.W.CBU.AMSTRN.ARVIND'
150 Opening ASCII mode data connection for file list.
550 'STTEST.W.CBU.AMSTRN.ARVIND': The system cannot find the file specified.
|
_________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Feb 24, 2011 10:17 am Post subject: |
|
|
I think superk is correct. I don't think you can specify the destination file name using a mget. also mgets and mputs run into lots of issues if the operating systems are different since the syntax for file names don't usually sync. |
|
Back to top |
|
|
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Thu Feb 24, 2011 12:41 pm Post subject: |
|
|
oops.
Our requirement is there will be only one file but it will vary with diff date time stamp and Sequence number in the middle. I need to get that and copy into our mainframe file.
Sample file name
Format : BNYMAMS_<date>_<seq num>_TRN_RQ.TMP
Sample : BNYMAMS_12122011_004_TRN_RQ.TMP
*date and seq num can be any value. No logic for that like todays date etc
So thought of using Wild card.
I can do that by listing into a file ... read the file and dynamically create a normal FTP card, but is there a solution with single FTP step
Thanks _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Feb 24, 2011 2:31 pm Post subject: |
|
|
arvibala wrote: | ... but is there a solution with single FTP step |
Yes. Have the other site initiate the transfer to yours, or have them change the naming convention so that it can work on your site (we always mandated a MS-DOS 8.3 standard). Otherwise, you already alluded to the only realistic option. |
|
Back to top |
|
|
|
|