View previous topic :: View next topic |
Author |
Message |
MY4114 Beginner

Joined: 18 Dec 2002 Posts: 8 Topics: 2
|
Posted: Tue Feb 25, 2003 5:30 pm Post subject: Batch job to FTP/NDM a file to mainframe |
|
|
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 |
|
 |
Venkata Ramana Reddy Beginner

Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Tue Feb 25, 2003 6:26 pm Post subject: |
|
|
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 |
|
 |
MY4114 Beginner

Joined: 18 Dec 2002 Posts: 8 Topics: 2
|
Posted: Wed Feb 26, 2003 9:23 am Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Feb 26, 2003 9:49 am Post subject: |
|
|
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 |
|
 |
MY4114 Beginner

Joined: 18 Dec 2002 Posts: 8 Topics: 2
|
Posted: Wed Feb 26, 2003 3:43 pm Post subject: |
|
|
Thanks semigeezer and Venkata Ramana Reddy |
|
Back to top |
|
 |
agredell Beginner
Joined: 04 May 2006 Posts: 27 Topics: 6
|
Posted: Mon Jul 17, 2006 8:43 am Post subject: Secure FTP |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Jul 17, 2006 8:49 am Post subject: |
|
|
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 |
|
 |
|
|