IBM FTP Adapter manual Make Directory -MKD, Passive Mode -PV or -PASV, Port Mode -PT or -PORT

Page 23

Chapter 3 - FTP Commands

List of Commands

Make Directory (-MKD)

Use the Make Directory adapter command (-MKD) to create a directory. For example, if a file specified in a PUT operation belongs in a directory that does not exist, the –MKDcommand creates the new directory.

If the –MKDcommand is not specified and the file specified on a PUT operation points to a directory that does not exist, the adapter will fail.

This is an optional command.

-MKD

For example:

PUT(“FTP”, -URLftp://jdoe:secret@server1/some/folder/data.txt -MKD”,Some data”)

will force jdoe/some and then the jdoe/some/folder to be created. A new file called data.txt will be added to this new directory.

Passive Mode (-PV or -PASV)

The Passive Mode adapter command (-PVor -PASV) specifies that you only try

passive mode for the FTP data connection. Passive mode is primarily useful for firewalls and is a preferred connection method for security reasons.

By default, the adapter attempts to connect using passive mode. If unsuccessful, the adapter uses Port Mode; see the Port Mode adapter command (-PT). During a

passive mode connection, the server listens for the connection and dictates where the adapter is to connect.

-PASV

Note Older servers might not support passive mode.

Port Mode (-PT or -PORT)

The Port Mode adapter command (-PTor -PORT) specifies that you only try port

mode for the FTP data connection. This is an older connection method and may be the only way to connect on older servers.

F T P A d a p t e r R e f e r e n c e G u i d e

2 3

Image 23
Contents FTP Adapter Reference Guide Document History Part Product Version Published Number Contents Troubleshooting Related References About This DocumentSystem Requirements FTP AdapterOverview About Sockets Access to International VANsIAaliascardnum OAaliascardnum Command AliasList of Commands FTP CommandsLSsorttype Audit -A or -AUDIT Account -AC or -ACCTClient Certificate -CERT Client Certificate Password -CPASSCertificate Authority -CA Code Page Remote -CPR Code Page Local -CPLOpen Site Transparent User Userfw Userfwpass Firewall Connection Method URL -FW or -FIREWALLFtpuser, Pass ftppass Adapter Behavior when -FIREWALL Command PresentOpen Userlogon or User URL SyntaxTokens Replaced with FTP URL -URL Ftpext-m1st-02.txt Keep Server -KS Ignore -I or -IGNOREList Option -LS Make Directory -MKD Passive Mode -PV or -PASVPort Mode -PT or -PORT Quantity -QTY Private Key Password -KPASSPrivate Key -PKEY Number of files to be retrieved by the adapter Site -SITEStage -STG or -STAGE SSL Encryption Strength -STRSSL Protocol -SPROTO WIN32 System -SYSTrace -T or -TRACE Data Sources Syntax SummaryData Targets Examples Using FTP Adapter CommandsURL Syntax Syntax Summary URL Syntax URL Encoding Adapter Audit Log TroubleshootingSample FTP Adapter Trace File Adapter Trace FileTroubleshooting Adapter Trace File Messages Appendix a Return Codes and Error MessagesAppendix a Return Codes and Error Messages Index Index