IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL to Transfer File from Mainframe to PC Lan Folder ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Thu Jan 23, 2014 5:56 pm
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 23, 2014 7:23 pm
Reply with quote

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

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Thu Jan 23, 2014 9:39 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jan 23, 2014 9:44 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Jan 24, 2014 1:41 am
Reply with quote

WSA? (Sorry to be so terse but I am on medical leave right now. Search for WSA in the forums. )
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Jan 24, 2014 6:36 am
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Jan 24, 2014 6:56 am
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jan 24, 2014 1:16 pm
Reply with quote

=6 and Tansfer Files is the emulator, probably using $indfile.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jan 24, 2014 5:14 pm
Reply with quote

Bill Woodger wrote:
=6 and Tansfer Files is the emulator, probably using $indfile.
Agree - Chapter 8. Command (option 6)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 0
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
Search our Forums:

Back to Top