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 wildcard

 
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
cvidhya
Beginner


Joined: 14 Dec 2002
Posts: 2
Topics: 2

PostPosted: Thu Jun 24, 2004 3:41 pm    Post subject: FTP wildcard Reply with quote

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


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

PostPosted: Fri Jun 25, 2004 5:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
arvibala
Beginner


Joined: 12 Feb 2008
Posts: 142
Topics: 67

PostPosted: Thu Feb 24, 2011 3:52 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Feb 24, 2011 7:38 am    Post subject: Reply with quote

That syntax does NOT look right to me. I'd suggest you double-check it on that FTP server.

Usually, it's:

>mget foreign_file

As shown here in the z/OS V1R10.0 Comm Svr: IP User's Guide and Commands manual.
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Thu Feb 24, 2011 10:17 am    Post subject: Reply with quote

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


Joined: 12 Feb 2008
Posts: 142
Topics: 67

PostPosted: Thu Feb 24, 2011 12:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Feb 24, 2011 2:31 pm    Post subject: Reply with quote

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
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