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 

Batch job to FTP/NDM a file to mainframe

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
MY4114
Beginner


Joined: 18 Dec 2002
Posts: 8
Topics: 2

PostPosted: Tue Feb 25, 2003 5:30 pm    Post subject: Batch job to FTP/NDM a file to mainframe Reply with quote

Does anyone have the steps/job to do a FTP/NDM in BATCH. Basically I need to upload a file from my PC to mainframes in a scheduled batch job. Would appreciate if you can share the code.

Thanks.
Back to top
View user's profile Send private message
Venkata Ramana Reddy
Beginner


Joined: 02 Dec 2002
Posts: 70
Topics: 19
Location: California

PostPosted: Tue Feb 25, 2003 6:26 pm    Post subject: Reply with quote

FTP Batch job

Code:

//FTP00001 EXEC PGM=IKJEFT01,DYNAMNBR=50         
//OUT      DD   SYSOUT=*                         
//AMSDUMP  DD   SYSOUT=*                         
//SYSTSPRT DD   SYSOUT=*                         
//SYSIN    DD   DUMMY                             
//SYSPRINT DD   DUMMY                             
//OUTPUT   DD   SYSOUT=*                         
//INPUT    DD *
IP Address
Userid
password
pwd                                                                     
ascii                                                                   
Your Pc Path
pwd                                                                     
GET  'YOUR.MAINFRAM.FILE' YOUR_PC_FILE.TXT
QUIT   
/*       
//SYSTSIN  DD  *                                 
FTP (EXIT                                         
/*       

_________________
Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement.
Back to top
View user's profile Send private message
MY4114
Beginner


Joined: 18 Dec 2002
Posts: 8
Topics: 2

PostPosted: Wed Feb 26, 2003 9:23 am    Post subject: Reply with quote

Thanks for the code. I have another question. Suppose we are using IND$FILE for file trasfer, is there a way to do it in batch?
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Feb 26, 2003 9:49 am    Post subject: Reply with quote

no. IND$file must be initiated at the client side through an emulator attached to a logged in session. This topic is probably the most frequently discussed topic on various mainframe discussion lists, so you may want to go over to groups.google.com and do a few searches there. The gist of it is that there are many ways to do this (NFS, FTP, ISPF's client, email, etc) and you just need to decide which one is easiest or most secure for you. Most people find FTP to be the easiest, but none of them, save possibly for NFS, are very complicated.
Back to top
View user's profile Send private message Visit poster's website
MY4114
Beginner


Joined: 18 Dec 2002
Posts: 8
Topics: 2

PostPosted: Wed Feb 26, 2003 3:43 pm    Post subject: Reply with quote

Thanks semigeezer and Venkata Ramana Reddy
Back to top
View user's profile Send private message
agredell
Beginner


Joined: 04 May 2006
Posts: 27
Topics: 6

PostPosted: Mon Jul 17, 2006 8:43 am    Post subject: Secure FTP Reply with quote

Greetings!

Sorry to reply to such an old topic, but I can't find any answers when searching on this topic.

We have a need to send files to a vendor; they require that we use Secure FTP (SFTP) to do so, and we've just completed installing and configuring in MVS. My sysprog told me this morning that "the started task is running".

My requirement is to use a single batch job (if at all possible) in Z/OS (MVS, whatever) to create the flat files AND to transfer them, using Open SSH to do the file transfer.

I'm not clear on how to establish the connection to USS from Z/OS, and then what to invoke to create the files on the remote server. Do the commands look like regular FTP commands? What PGM= value is correct? EXEC PGM=FTP doesn't establish the connection.

Any help is appreciated! A sample JCL stream would be fantastic!
_________________
Alan Gredell
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jul 17, 2006 8:49 am    Post subject: Reply with quote

agredell,

You just need the following.

Code:

1. IP address of your USS
2. Userid
3. Password


Once you have these you can just submit the job shown above (2nd post from the top)

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
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF 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