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 

MGET with FTP

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Other Technical Topics
View previous topic :: View next topic  
Author Message
tiggy
Beginner


Joined: 23 Mar 2005
Posts: 19
Topics: 6

PostPosted: Tue May 31, 2005 1:58 pm    Post subject: MGET with FTP Reply with quote

Hi all,

I am trying to do an MGET from the mainframe. The code I'm using is as follows:

Code:
//FTP01    EXEC PGM=FTP,PARM='216.191.23.11 (EXIT'     
//DUMP     INCLUDE MEMBER=CEEDUMP                     
//INPUT    DD  *                                       
tiggy ********                                         
ascii                                                 
LOCSITE LRECL=47                                       
MGET Matson.*.csv 'NVSTN.SHR.MATSON.FTP(+1)'           
QUIT   
//OUTPUT   DD  SYSOUT=*                               
//SYSPRINT DD  SYSOUT=*                               
//*

I'm running this on z/OS V1R5 with IBM FTP CS V1R5. The code above does not work as it should. I'm expecting it to pick up each file & put each individual file into it's own GDG. Instead, it picks up the file and puts it into a dataset with my user id as the high level qualifier.

The reason I'm having to do the MGET is because the second qualifier of each file is a timestamp. The only other way I can think of doing this if I can't get the MGET to work is to sent the output of an LS to a dataset, read in the dataset into a program, find the file names that I need and from this, write out the control card which will then be used as input to the FTP.

As you can tell, this will take much longer. If anyone could offer suggestions on how to make my code work or an alternate solution, I would greatly appreciate it.

Thanks,

Robert
_________________
Robert Tighe
Legacy Systems Analyst
Keane Canada, Inc.
Robert_F_Tighe@keane.com
Back to top
View user's profile Send private message MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Tue May 31, 2005 2:52 pm    Post subject: Reply with quote

Tiggy,

The MGet/MPUT Commands are NOT applicable to generation data groups (GDGs). you can use LCD parameter to change the local directory.
Code:

//STEP0100 EXEC PGM=FTP   
//SYSPRINT DD SYSOUT=*   
//INPUT    DD *           
USERID
PASSWORD
LOCSITE LRECL=47     
LOCSITE BLKSIZE=27965
LOCSITE RECFM=FB     
LCD 'YOUR HLQ'
MGET Matson.*.csv (REPLACE
QUIT
/*


This gets all the files(Matson.*.csv) in the directory to the MF, but puts them as <YOUR HLQ>.<PC filename>.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

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


Joined: 23 Mar 2005
Posts: 19
Topics: 6

PostPosted: Tue May 31, 2005 3:09 pm    Post subject: Reply with quote

Kolusu,

I appreciate the suggestion on this, however, this doesn't help. The problem that I have is that this is a job which will have to go into production and therefore have a high level qualifier of NVSPN. The next problem with this is that it has to go into a predetermined dataset name (like the GDG) as it will be read into a few other programs.

I have used the GDG with an MGET, but in an SSL FTP. Here's the code that I used at the time:

Code:
//FTP01    EXEC PGM=FTP,PARM='-r TLS ftp.elit.eds.com 20921 (EXIT'     
//DUMP     INCLUDE MEMBER=CEEDUMP                                     
//SYSFTPD  DD DISP=SHR,DSN=SYS1.TCPPARMS(SSLDATA)                     
//INPUT    DD  *                                                       
 KPR *****                                                             
 SENDSITE                                                             
 ASCII                                                                 
 prompt off                                                           
 QUOTE SITE PREFIX='LCSPN.LRA0DX.DISPATCH',SUFFIX=GDG                 
 LOCSITE LRECL=696                                                     
 MGET *,D=dAspItch*                                                   
 PWD                                                                   
 QUIT                                                                 
//OUTPUT   DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//*


This creates the GDG's without problem. Would there be a reason why this would work under SSL FTP (CSV1R2) and not under FTP (CS V1R5).

You can see why I'm confused. Hopefully you know something that I don't. Thanks for your help with this.

Thanks,
Robert
_________________
Robert Tighe
Legacy Systems Analyst
Keane Canada, Inc.
Robert_F_Tighe@keane.com
Back to top
View user's profile Send private message MSN Messenger
lal
Beginner


Joined: 21 Oct 2003
Posts: 70
Topics: 25

PostPosted: Thu Sep 10, 2009 9:40 pm    Post subject: Reply with quote

Hi Kolusu,
I have similar issue like tiggy, and I have to get multiple files but the timestamp part of filename in the remote system has numericals and is greater than 8 characters for example my filenames are

USERID.FILENAME1.090909120000.FILE
USERID.FILENAME2.090909120000.FILE
USERID.FILENAME3.090909120000.FILE

In this case, I am getting an invalid filename when I try to ftp since mainframe dataset cannot have qualifier of numericals and greater than 8. Can you please suggest how to resolve this.

Kindly appreciate the help

Thanks,
lal
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Sep 11, 2009 5:48 am    Post subject: Reply with quote

What's your goal? Do you need a one-to-one relationship between the remote files and your host target datasets? Or do you need to just concatenate all of the remote files into a single host target dataset?

Either way, unless you can get the remote site to change their file naming conventions, you WILL have to code seperate unique GET statements for each of the remote filenames you want to retrieve.
Back to top
View user's profile Send private message
lal
Beginner


Joined: 21 Oct 2003
Posts: 70
Topics: 25

PostPosted: Fri Sep 11, 2009 8:50 am    Post subject: Reply with quote

Hi Superk,
Having an one-one-one relationship between the remote files and host target datasets would be an ideal one.

Well, I thought there would be someother way instead of doing an unique GET statements...

Thanks Superk for your inputs

Thanks,
lal
Back to top
View user's profile Send private message
suresh_d
Beginner


Joined: 20 Sep 2006
Posts: 33
Topics: 9

PostPosted: Wed Apr 21, 2010 5:18 am    Post subject: Reply with quote

Hi,

I was trying to connect from DOS using command FTP 'ipaddress'
then userid and passwrod. Everything is fine till here. But then in my system we have a another level of login, how to do that.

This is how my login happens:
user id password
then there will be list of subsytems of clients, we select one among them and pre enter. Then again we enter another leve userid and password.

How to achieve this using dos prompt.

OR any other way to do a ftp of all members of pds to windows with member names as .txt file names.

Thanks,
Suresh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 21, 2010 10:20 am    Post subject: Reply with quote

suresh_d,

Check this post

http://www.mvsforums.com/helpboards/viewtopic.php?p=565#565

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Radhikahande
Beginner


Joined: 03 Jun 2019
Posts: 1
Topics: 0

PostPosted: Mon Jun 03, 2019 11:51 pm    Post subject: Reply with quote

Excellent thread! I got valuable information here...Thank you!
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 -> Other Technical Topics 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