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 

File transfer from mainframe to PC

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
SR22
Beginner


Joined: 18 Oct 2005
Posts: 4
Topics: 3

PostPosted: Tue Jan 24, 2006 10:29 am    Post subject: File transfer from mainframe to PC Reply with quote

Hi All,

I am trying to transfer a bunch of files from mainframe to my hard disk . Is there a jcl to do this .?



Thanks,
SR22
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Jan 24, 2006 11:12 am    Post subject: Reply with quote

SR22,

Why not use FTP with PUT statements?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Luis Pinto
Beginner


Joined: 13 Jan 2006
Posts: 5
Topics: 1

PostPosted: Thu Jan 26, 2006 8:45 am    Post subject: Reply with quote

Hi SR22,

try this:

Code:

//GIBAEFTP JOB (D,GIBA,0001),'SR22',MSGCLASS=X,
// CLASS=A,NOTIFY=&SYSUID,MSGLEVEL=(1,1),REGION=0M   
//*--------------------------------------------------------------*
//* SENDPC  - Send files to my PC                                *
//*--------------------------------------------------------------*
//*                                                               
//SENDPC   EXEC PGM=FTP,REGION=4M,PARM='put here PC ip address'
//*                                                               
//SYSIN    DD  *                                                 
userid password                                             
ASCII                                                             
PUT 'mainframe_dsn' local_file_name             
CLOSE                                                             
QUIT                                                             
/*                                                               
//SYSPRINT DD  SYSOUT=*

You can also run a bat file on your PC and get the files. This aproach avoids the need of running ftp server on your PC.

I have 2 files:

bat file: transfer.bat
content:
ftp -s:ftpcommands.txt (put here your mainframe ip address without surrounding brackets)

command file: ftpcommands.txt
content:
mainframe_userid
mainframe_password
get remote-file [local-file]
bye

In bat file or in command file you can write additional commands to change working directories (local and remote), you can also set allocation parameters if you are sending files to mainframe, and so on....

If you want to know what commands you can issue, open a FTP session and type "help" or "remotehelp".

I, hope this helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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