Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL to Transfer File from Mainframe to PC Lan Folder ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL to Transfer File from Mainframe to PC Lan Folder ?
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

Site Director


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

PostPosted: Thu Jan 23, 2014 7:23 pm    Post subject:
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    Post subject:
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: 7912
Location: Bellevue, IA

PostPosted: Thu Jan 23, 2014 9:44 pm    Post subject:
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: 641
Location: Whitby, ON, Canada

PostPosted: Fri Jan 24, 2014 1:41 am    Post subject:
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 User


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

PostPosted: Fri Jan 24, 2014 6:36 am    Post subject: Re: JCL to Transfer File from Mainframe to PC Lan Folder ?
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: 641
Location: Whitby, ON, Canada

PostPosted: Fri Jan 24, 2014 6:56 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Fri Jan 24, 2014 1:16 pm    Post subject: Reply to: JCL to Transfer File from Mainframe to PC Lan Fold
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

Senior Member


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

PostPosted: Fri Jan 24, 2014 5:14 pm    Post subject: Re: Reply to: JCL to Transfer File from Mainframe to PC Lan
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us