View previous topic :: View next topic
|
Author |
Message |
csiva007
New User
Joined: 29 Sep 2005 Posts: 10
|
|
|
|
Can any one give some ftp program written in jcl? |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
FTP step in a JCL
Code: |
//AAAB EXEC PGM=FTP,
// PARM='(EXIT',
// COND=(0,NE)
//*
//INPUT DD DSN=AAA.BBB.CCC.DDD,
// DISP=SHR
//*
//SYSPRINT DD SYSOUT=* |
Input file AAA.BBB.CCC.DDD
Code: |
ftp ipaddress
userd
password
cd location
put 'sending file(created from the jcl )' receiving file
close
quit |
hope this helps. |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi frnd,
i think v need to specify the 'bin' and 'quote site trail' command to put the file using FTP? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
sathish_rathinam
New User
Joined: 22 Aug 2005 Posts: 59 Location: india
|
|
|
|
hi khamarutheen,
BIN is coded only if u need to send the input file data in the binary format ,later at the receiving end they will encrypt it to normal data..
regards,
sathish |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi frnd,
Thank u for ur valuable information. let me correct it. |
|
Back to top |
|
|
gauravk
New User
Joined: 27 Feb 2006 Posts: 4 Location: Pune
|
|
|
|
I tried using the above code provided by Radhakrishnan. I wanted to upload a file from my local machine to mainframe. But it gave me following error...
FTP: EXIT has been set.
Connect to ?
XXX.XX.XX.XXX
Connecting to: XXX.XX.XX.XXX port: 21.
recv error from getNextReply - EDC8128I Connection refused. (errno2=0x769F0442)
Connection with XXX.XX.XX.XXX terminated
*** Control connection with XXX.XX.XX.XXX dies.
Std Return Code = 10000, Error Code = 00008
I think this is happening because of some firewall settings. But I am able to upload/download files manually. i.e. using START --> 6 option from the local machine with the same id.
Could someone please guide me what needs to be done here? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
gauravk, let me see if I understand you correctly:
You're saying that you can, from TSO, open up and log into an FTP session to the remote FTP server on port 21, yet on the exact same machine, submitting a job to run the same FTP process in the background, you're being denied access to the same server?
- Does your FTP session from TSO use the same RACF ID as the batch job? Could it be a security issue?
- Are you sure that the remote FTP server was active when this error occured? Is it possible that the FTPD daemon needs to be started on the remote server?
- You'll probably need a network engineer to run a diagnostic trace with a network sniffer. You don't have many diagnostic tools available, other than the normal ones like PING, TRACERTE, and NETSTAT. |
|
Back to top |
|
|
gauravk
New User
Joined: 27 Feb 2006 Posts: 4 Location: Pune
|
|
|
|
Thanks for replying.
You have got it right. I am able to FTP the file from TSO. Following is the command getting submitted on TSO command line for this -
IND$FILE PUT '<host file name>' ASCII CRLF RECFM(V) LRECL(133)
Just a couple of doubts -
1. I need to connect to the local machine from host. So I have to specify ip address of my machine in the input file.
2. If this is a problem of FTP server not being active on my/remote machine then even the TSO command should fail.
Please let me know if above points are valid. Also specify how can I check which RACF IDs are getting used for batch job and FTP session from TSO. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
IND$FILE is not the TSO FTP command. FTP is the TSO FTP command. IND$FILE has nothing to do with FTP. It is a proprietary, unsupported and undocumented file transfer mechanism that works between a 3270 emulation program and a PC. IND$FILE can only function if you are logged onto the mainframe host from the emulation software. There is no possibility of batch functionality. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
I am trying to upload a file by using the above JCL but unable to transfer the file.
The below file XK89.HT is a html file and I am trying to upload that report to my website.
Host name : ftp . 0fees . net or 209.190.85.248
User ID : FEES0_3240211
Password : XXYYZZ
-------------------------------
Not sure about this part..
I want to upload it to
Root/htdocs/ is the usage
correct?
-------------------------------
Code: |
//XK89KAPA JOB ,'COPY TO DISK',CLASS=4,MSGCLASS=P,NOTIFY=&SYSUID
//AAAB EXEC PGM=FTP,PARM='(EXIT',COND=(0,NE)
//INPUT DD DSN=XK89.HT,DISP=SHR
//SYSPRINT DD SYSOUT=*
Use [URL] BBCode for External Links
FEES0_3240211
XXYYZZ
cd \htdocs\index.htm
close
quit
/* |
I get the below error, I think its unable to find the host name not sure...
Code: |
EZA1736I FTP (EXIT
EZA1450I IBM FTP CS V1R9
EZA1772I FTP: EXIT has been set.
EZA1456I Connect to ?
EZA1736I EOD Timings from Priority Depots
EZA2579E Usage error: Valid parameters are:
ftp -e host_name port_number ( Exit
Exit=nn
-d TRACe
-w nn TImeout nn
-p tcpip TCP tcpip
-t dsn TRANslate dsn
-g
-i
-n
-v
|
Tried the below link, but I get the same error
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/4.9?DT=20050708142126 also has a similar syntax
Could you please shed some light..
Thanks in advance, |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
First, you're responding to a thread that has been inactive for 3 years.
Second, you may need a backslash or a forward slash in the cd -- it depends on whether you're going to a Windows server or a Unix server.
Third, the INPUT DD name contains the FTP commands, not the file you're trying to send.
Fourth, the JCL is
Code: |
//FTP EXEC PGM=FTP,
// PARM='ftp.0fees.net (EXIT'
//SYSMDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INPUT DD *
userid
password
cd \htdocs
put 'XK89.HT' <remote file name>
quit
/* |
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi Robert,
Many thanks for your time and the explanation. I corrected JCL accordingly.
I am trying to upload some reports from Mainframe (HTML format) to a webserver (ftp.0fees.net) --> free web hosting site
This FTP host(ftp.0fees.net) reponds if we use FTP softwares like Filezilla (PC) to upload files.
But if we try to ping the site from mainframes, it just does not respond,
I am very new to FTP. So having trouble with it.
The error that comes up is...
Is this caused by some mainframe "FIREWALL" |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
why not ask Your support ?? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Connection timing out, especially before the initial handshaking is complete, is typically either a firewall issue (router blocking the connection) or the server isn't listening on port 21. It is rare in my experience for there to be a firewall running on a mainframe blocking access -- it's usually a router issue.
If you can't ping the server from the mainframe, I would tend to believe there's a network issue with a router preventing access. This is an issue you absolutely must talk to the network support group about since the precise problem and its resolution will depend upon your network setup. There are sites where mainframe access from the Internet is blocked for various reasons, so again your site network support group needs to be involved. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
oh sorry.. I was trying with many free web hosting sites, so accidentally posted the other log.
I was unable to FTP to both the sites. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
oh sorry.. I was trying with many free web hosting sites, so accidentally posted the other log.
I was unable to FTP to both the sites.
Thanks Robert, Its clear now that some network setup must be tuned. I will seek our NSG support.
On the other hand does mainframes really have a firewall?
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
As far as i know, anything that uses tcp/ip can be setup behind a firewall. |
|
Back to top |
|
|
|