View previous topic :: View next topic
|
Author |
Message |
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
I use =6 in TSO to transfer files from Mainframe to Lan folder (=6, Actions, Transfer Files, then Receive Files from Host). Does anyone have example JCL to Transfer File from Mainframe to PC Lan folder? I would like to add this process to some of our batch jobs instead of manually transferring files from TSO.
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There are several prior topics that have working JCL to run an FTP in batch. Suggest you review some of these.
You need to talk with your network people to learn where there is an FTP service (you will run the FTP client on the mainframe) that is available to receive incoming transmissions.
There are possibly some existing batch jobs that use FTP to send files that could be used as a model also. |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
I did find the following FTP Batch Proc. I remember the SYSIN needs input/output files, password, etc. but I don't know the format.
I'll keep looking - thanks.
Code: |
//FTPBATCH PROC
//*-------------------------------------------------
//*-THIS IS THE BATCH FTP PROC --------
//*-------------------------------------------------
//STEP1 EXEC PGM=FTP,PARM='( EXIT',REGION=0K
//OUTPUT DD SYSOUT=*,DCB=BLKSIZE=133
//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=133
//SYSTCPD DD DSN=NET1.TCPPARMS(TCPDATA),DISP=SHR
//SYSFTPD DD DSN=NET1.TCPPARMS(FTPDATA),DISP=SHR
//INPUT DD DDNAME=SYSIN |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Find the Communications Server bookshelf at IBM and look in the User's Guide manual -- the FTP commands are discussed there. You will need to provide the IP address (or DNS name) of the server, a user id / password for that server (unless it allows anonymous FTP sessions), then a CD command to change to the appropriate directory on the server, followed by a PUT FTP command to place the mainframe file on the server, then a QUIT command to end the FTP session. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
WSA? (Sorry to be so terse but I am on medical leave right now. Search for WSA in the forums. ) |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Gary McDowell wrote: |
I use =6 in TSO to transfer files from Mainframe to Lan folder (=6, Actions, Transfer Files, then Receive Files from Host). Does anyone have example JCL to Transfer File from Mainframe to PC Lan folder? I would like to add this process to some of our batch jobs instead of manually transferring files from TSO.
Thanks. |
I don't know what you are describing with your "=6, Actions, Transfer Files ..."
For the most part there are three methods to transfer data between a PC and a mainframe.- The 3270 file transfer method, sometimes call IND$FILE. This cannot be run in batch. Period. End of story. IND$FILE is used to push data to a mainframe through a TSO session or to pull mainframe data through a TSO session. IND$FILE is convenient for modest transfers, but it is rather slow. I suspect the "=6, Actions, Transfer Files" method you mentioned is to get into the ISPF "Command Shell" and then use IND$FILE through menus provided by your terminal emulator. The exact method depends on the terminal emulator software.
- The ISPF Work Station Agent, or WSA. I tried it back in the 90s when it first came out and didn't like it, though I didn't try the file transfer part of it. I do not know if the file transfer piece can run in ISPF in batch.
- FTP. FTP is the "standard" method to transfer data over the internet. FTP has a client side - the FTP TSO command and batch program, and there is an FTP command you can run in the Windows "cmd" window that is somewhat similar to the mainframe FTP client. When you run the FTP client it must connect to an FTP server. Most, though not all, mainframe systems run an FTP server, but very few Windows systems have FTP server software installed; the software is not part of most Windows systems such Windows "Home" or Windows "Pro" systems. There is a "free" Windows FTP server that is part of the "Filezilla" suite. I installed it briefly several years ago and didn't like it. I found it difficult to setup and it had some operating issues I found unacceptable; I uninstalled it very quickly.
I have no recommendations since I do not know what you really want to do. My discussion just describes my understanding of what is available and my experiences trying to use what is available. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
WSA transfers files via an ISPF service called FILEXFER. It is fast (comparable to FTP) and very easy to automate with REXX in either batch or online modes. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
=6 and Tansfer Files is the emulator, probably using $indfile. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
|