|
- Reminder about the FTP protocol
- FTP commands
- Example: Getting a TEST file found in the AAA library of an AS/400:
- Use conditions
- Required permissions
FTPCommand (Function) In french: FTPCommande Remarks Reminder about the FTP protocol This protocol is using 2 communication channels: - A command channel: is used to send commands and to receive error or success messages,
- A data channel used to transfer the data associated with the command.
FTP commands All the commands that can be used on an FTP server are found in the RFC989 specification. This document is available on the Internet (use a search engine and search for the RFC959 reference). Some standard examples: Uploading and downloading files with FTPCommand 1. Downloading files:
Response, ResData are strings FTPCommand(<Connection identifier>, ... "RETR" + <Name file server>, ... Response, ResData, <Transfer mode>) // ResData contains the file
2. Uploading files:
Response, ResData, DataResult are strings // ResData contains the file to upload FTPCommand(<Connection identifier>,... "STOR " + <Name File server>, ... Response, DataResult, <Transfer mode>, ResData)
Example: Getting a TEST file found in the AAA library of an AS/400:
Response, ResData are strings FTPID = FTPConnect("as400", "login", "PWD") FTPCommand(FTPID,"RETR " + "AAA/TEST", Response, ResData) // ResData contains the file fSaveText("C:\Tmp\test", ResData)
This page is also available for…
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |