View previous topic :: View next topic
|
Author |
Message |
csiva007
New User
Joined: 29 Sep 2005 Posts: 10
|
|
|
|
i need the syntax for PUT and GET command in FTP |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
- put local_file remote_file
local_file
Specifies the name of the file on your local host being sent to the remote host.
remote_file
Specifies the name that the delivered data set is given on the remote host. If the remote_file name is not specified, the remote_file name is the same as the local_file name.
- put //dd:ddname remote_file
//dd:ddname
Specifies the DDNAME of the local file.
remote_file
Specifies the name that the delivered data set is given on the remote host. If the remote_file name is not specified, the remote_file name is the same as the local_file name.
- get remote_file local_file (replace
remote_file
Specifies the name of the file to be retrieved from the remote host.
local_file
Specifies the name of the local file created as a result of the Get subcommand.
If the current local working directory is a PDS, local_file is the name of the member in the PDS. If the current local working directory is a data set prefix, the local file is a sequential data set with the local_file name appended to the current local working directory. If the current local working directory is an HFS directory, the local file is an HFS file in that directory.
You can override the usage of the current local working directory in the local file name by specifying local_file as a complete data set name enclosed in single quotation marks ('). If local_file is not specified, the local_file name is the same as the foreign_file name.
(replace
Causes a data set on your local host to be overwritten, if it already exists. If the data set already exists, and you do not use the replace parameter, the existing data set is not overwritten. A message informing you of this is displayed.
- get remote_file //dd:ddname
remote_file
Specifies the name of the file to be retrieved from the remote host.
//dd:ddname
Specifies the DDNAME of the local file.
All well documented here publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/5.0?DT=20050708142126 |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi frnd,
i have never come across anything like PUT,GET in JCL. i think it's in REXX. just check it out. and it's like ACCEPT and DISPLAY in COBOL. |
|
Back to top |
|
|
sathish_rathinam
New User
Joined: 22 Aug 2005 Posts: 59 Location: india
|
|
|
|
These are not specific for REXX, we can use it in ordinary JCL also.
You can also have all these FTP steps in a seperate member and can include this member in a library and execute in your job itself if you are not coding it directly in your JCL.
Superk, could you explain what the difference is between FTP'ing from mainframe to mainframe and FTP'ing from mainframe to other servers.
What are the changes we should make in the case of FTP'ing from a mainframe to other sytems?
regards,
sathish |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
sathish_rathinam wrote: |
...could you explain what the difference is between FTP'ing from mainframe to mainframe and FTP'ing from mainframe to other servers.
What are the changes we should make in the case of FTP'ing from a mainframe to other sytems? |
I wish I had an easy answer, but I don't. Every system is going to have it's own unique requirements. As a general rule, most non-mainframe based FTP servers don't like to see the SITE commands, so you should disable the sending of SITE commands before you issue a GET or PUT. You need to know what format the receiving system requires for the data (EBCDIC or ASCII) and if the data should be translated or sent as-is (BINARY). Many ASCII systems don't support the APPEND command. Most ASCII systems (except VAX VMS) don't support multiple versions of the same filename, so you have to be careful before PUTing a file that may already exist. If you are sending fixed-length (F or FB) records to an ASCII machine, you may have to strip off any trailing blanks from the records.
Be careful with commands that can cause memory shortages on the remote FTP server (MPUT/MGET/MDEL) as these can cause an FTP failure on a busy server. |
|
Back to top |
|
|
|