You can add ccustom commands for AS2, File System, FTP, SFTP, S3, AzureBlob, Email, and OFTP Endpoints to be executed when the Data Flow runs. No commands are available for AS2 and OFTP Endpoints when they are the source because these are push-only protocols (that is, inbound data for AS2 and OFTP is pushed by your trading partner). Some commands are valid across all Endpoint types while others vary per Endpoint as described below.
Use the links below to navigate directly to command categories.
- Common commands
- AS2 Endpoint commands
- File System Endpoint commands
- FTP Endpoint commands
- SFTP Endpoint commands
- S3 Endpoint commands
- AzureBlob Endpoint commands
- Email Endpoint commands
- OFTP Endpoint commands
- RNIF Endpoint Commands
For examples of how you might use these commands, see Command Examples.
Common commands
The following commands are available across all supported Endpoints.
SET
Change a property value. The new value only affects the commands that follow the SET.
SET property=value
property = value | Property and new value
|
Valid properties for SET command are as follows:
host.Path.PUT=xxx | Valid only for AS2 Endpoints. Use this property to override the resource path in the Endpoint's Partner URL when multiple resource paths are used for the same partner. |
PostGetCommand PostPutCommand |
Valid only for FTP and SFTP Endpoints. Use these properties to specify commands to be executed only after a successful GET or PUT, respectively. If multiple commands are needed after the GET or PUT, set this property to all of the commands separated by semicolons (;). If a specific FTP command needs to contain a semicolon, enclose that specific FTP command in quotes ("). The use of macro variables is supported. See Using Macro Variables in CIC (Post/Pre Command context) for a list of the applicable macros. |
PreGetCommand PrePutCommand |
Valid only for FTP and SFTP Endpoints. Use these properties to specify commands to be executed before a GET or PUT, respectively. This has the benefit of keeping the log results relative to just GETs and PUTs. In addition, for the PUT, it avoids connecting and logging into the server when there are no files to send. If multiple FTP commands are needed prior to the GET or PUT, set this property to all of the commands separated by semicolons (;). If a specific command needs to contain a semicolon, enclose that specific command in quotes ("). The use of macro variables is supported. See Using Macro Variables in CIC (Post/Pre Command context) for a list of the applicable macros. |
PrePutCommandForFirstFileOnly | Valid only for FTP and SFTP Endpoints. Use this property to specify commands to execute before a PUT only before the first file transfer. |
RetrieveDirectorySort | Valid only for FTP and SFTP Endpoints. Use this property to control the order in which files are downloaded from the server. Possible values include:
|
TerminateOnFail |
Valid for all Endpoints configured as source in a Data Flow.
Default value is True. |
WAIT
Pause execution.
WAIT seconds
seconds | Number of seconds to pause. |
AS2 Endpoint commands
The following commands are available for the AS2 Endpoint when it is the destination.
CLEAR
Clear a property string value. The cleared value only affects the commands that follow the CLEAR.
CLEAR property
property | Property name with no embedded spaces. |
PUT
Send one or more files to the host.
PUT "source" "destination"
source |
|
destination | Remote destination filename. If the destination contains a space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). The use of macro variables is supported. See Using Macro Variables in CIC (Destination context) for a list of the applicable macros. |
SET
Override the resource path in the Endpoint's Partner URL when multiple resource paths are used for the same partner
SET host.Path.PUT=xxx
File System Endpoint commands
The following commands are available for File System Endpoints.
CLEAR
Valid only for local File System Endpoints.
Clear a property string value. The cleared value only affects the commands that follow the CLEAR.
CLEAR property
property |
Property name with no embedded spaces. |
GET
Valid for Source Endpoints.
Receive one or more files from the host.
GET [-DEL] [-REC] "source"
-DEL |
Optional. If GET is successful, delete remote file. |
-REC |
Optional. Recursively retrieve nested subdirectories. |
source | Remote source path. You can specify a path (folder/ ) or a path+filter (folder/*.txt ) |
LCOPY
Copy one or more files locally.
LCOPY [–DEL] [-REC] [–UNI|–APE] "source" "destination"
-DEL | If the command is successful, delete the local file. If used with -REC, deletes the file and the subfolder structure. |
-REC | Recursively search all subdirectories and copy the subfolder structure into the destination. |
-UNI | Ensure the copied filename is unique. |
-APE | Append copied file to existing destination file. |
"source" | Source path
|
"destination" | Destination path.
|
PUT
Valid for Target Endpoints.
Send one or more files to the host.
PUT [-UNI|-APE] "source" "destination"
-UNI | Ensure remote filename is unique |
-APE | Append to the existing destination file |
source |
Source path
|
destination | Remote destination path. The use of macro variables is supported. See Using Macro Variables in CIC (Destination context) for a list of the applicable macros. |
SET
Valid for Target Endpoints.
Change a property value. The new value only affects the commands that follow the SET.
SET property=value
Valid properties for SET command are as follows:
PostProcessingCommand |
Specify the operating system command you want to run. For a File System Endpoint, the operating system is the one where the Access Point is running. The following examples would make a copy of each transferred file and rename the copy.
For more information, see Command Syntax in Working with Data Flows. |
PostProcessWorkingDirectory |
Specify a working directory for any commands that follow. |
PostProcessTimeout(seconds) |
Specify a time limit after which CIC stops attempting to run the command. A value of 0 means there is no timeout. |
GetNumberOfFilesLimit |
Specify the maximum number of files pulled during a GET operation. A value of 0 means there is no limit. |
FTP Endpoint Commands
The following commands are available for FTP Endpoints.
CD
Changes the current working directory on the host.
CD "directory"
directory | The new working directory |
CLEAR
Clear a property string value. The cleared value only affects the commands that follow the CLEAR.
CLEAR property
property | Property name with no embedded spaces. |
GET
Receive one or more files from the host
GET [-ASC|-BIN] [-REC] [-DEL] "source" "destination"
-ASC | Transfer file in ASCII format. |
-BIN | Transfer file in Binary format. |
-REC |
Recursively retrieve nested subdirectories. Optional. |
-DEL |
If GET is successful, delete remote file. Optional. |
source |
Remote source path. You can specify a path ( |
destination | CIC destination. The use of macro variables is supported. See See Using Macro Variables in CIC (Destination context) for a list of the applicable macros.
|
PUT
Send one or more files to the host.
PUT [-ASC|-BIN][-UNI|-APE] "source" "destination"
-ASC | Transfer file in ASCII format |
-BIN | Transfer file in Binary format |
-UNI | Ensure remote filename unique |
-APE | Append to the existing destination file |
source |
Source path
|
destination | Remote destination path. The use of macro variables is supported. See Using Macro Variables in CIC (Destination context) for a list of the applicable macros. |
QUOTE
Send a raw command to the FTP server
QUOTE "command"
command | Command to be sent to the server. (Example: PWD, CWD, DELE) See the FTP RFC 959 for more details on specific FTP commands. |
SITE
Sends a site-specific command to the server.
SITE "command"
command | Site-specific command with any arguments. |
TYPE
Set the default data type for file transfers.
TYPE "data type"
data type | ASCII or Binary |
SFTP Endpoint commands
The following commands are available for SFTP Endpoints.
CD
Changes the current working directory on the host.
CD "directory"
directory | The new working directory. |
CHGRP
Changes the group ID of the file or directory on the host.
QUOTE CHGRP group "path"
group | The numeric group id for the new group. |
path | The path to the remote file/directory. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
CHMOD
Changes the access permissions or modes of the file or directory on the host.
QUOTE CHMOD permissions "path"
permissions |
The absolute mode of the file/directory. Absolute modes are octal numbers specifying the complete list of attributes for the files; you specify attributes by OR'ing together these bits.
|
path | The path to the remote file/directory. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
CHOWN
Changes the user ID of the file or directory on the host.
QUOTE CHOWN owner "path"
owner | The numeric user id for the new owner. |
path | The path to the remote file/directory. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
CLEAR
Clear a property string value. The cleared value only affects the commands that follow the CLEAR.
CLEAR property
property | Property name with no embedded spaces. |
DIR
Get a directory listing of available files from the host.
DIR "source"
source | Remote source directory path. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
GET
Receive one or more files from the host
GET -REC –DEL "source" "destination"
-REC |
Recursively retrieve nested subdirectories. If used in conjunction with –DEL, the retrieved files, but not subdirectories, are deleted on the server. Optional. |
-DEL |
If the GET is successful, delete the remote file. Optional. |
source |
Remote source path. You can specify a path ( If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
destination |
CIC destination path.
|
PUT
Send one or more files to the host.
PUT -APE "source" "destination"
-APE | Append copied file to an existing destination file. |
source |
CIC source path
|
destination |
Remote destination path.
|
MKDIR
Creates a new directory on the host.
QUOTE MKDIR "directory"
directory | The name of the new directory. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
MKDIRS
Creates new directories on the host.
QUOTE MKDIRS "path"
path | The path of directories to create. Subdirectories are created using the / delimiter. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
PWD
Returns the name of the current working directory on the host.
QUOTE PWD
RENAME
Renames a file or directory on the host.
QUOTE RENAME "source" "destination"
source | The source file/directory to rename. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
destination | The destination file/directory name. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
RM
Removes a file on the host.
QUOTE RM "path"
path | The path of the file to remove. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
RMDIR
Removes a directory on the host.
QUOTE RMDIR "path"
path | The path of the directory to remove. If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
S3 Endpoint Commands
The following commands are available for S3 Endpoints.
CLEAR
Clear a property string value. The cleared value only affects the commands that follow the CLEAR.
CLEAR property
property | Property name with no embedded spaces. |
DIR
Get a directory listing of available files from the host
DIR "source"
source | Remote source directory path. |
GET
Receive one or more files from the host
GET -REC –DEL "source" "destination"
-REC | Recursively retrieve nested subdirectories. If used in conjunction with –DEL, the retrieved files, but not subdirectories, are deleted on the server. |
-DEL | If the GET is successful, delete the remote file. |
source |
Remote source path. You can specify a path ( If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
destination |
CIC destination path.
|
PUT
Send one or more files to the host.
PUT "source" "destination"
source |
|
destination | Remote destination filename. If the destination contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). The use of macro variables is supported. See Using Macro Variables in CIC (Destination context) for a list of the applicable macros. |
SET
Change a property value. The new value only affects the commands that follow the SET.
SET property=value
property = value | Property and new value.
|
Valid properties for SET command are as follows:
RetrieveDirectorySort | Use this property to control the order in which files are downloaded from the server. Possible values include:
|
AzureBlob Endpoint Commands
The following commands are available for AzureBlob Endpoints.
CLEAR
Clear a property string value. The cleared value only affects the commands that follow the CLEAR.
CLEAR property
property | Property name with no embedded spaces. |
DIR
Get a directory listing of available files from the host
DIR "source"
source | Remote source directory path. |
GET
Receive one or more files from the host
GET -REC –DEL "source" "destination"
-REC |
Recursively retrieve nested subdirectories. If used in conjunction with –DEL, the retrieved files, but not subdirectories, are deleted on the server. Optional. |
-DEL |
If the GET is successful, delete the remote file. Optional. |
source |
Remote source path. You can specify a path ( If the path contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
destination | CIC destination path.
|
PUT
Send one or more files to the host.
PUT "source" "destination"
source |
|
destination | Remote destination filename. If the destination contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). The use of macro variables is supported. See Using Macro Variables in CIC (Destination context) for a list of the applicable macros. |
SET
Change a property value. The new value only affects the commands that follow the SET.
SET property=value
property = value | Property and new value
|
Valid properties for SET command are as follows:
RetrieveDirectorySort | Use this property to control the order in which files are downloaded from the server. Possible values include:
|
Email Endpoint Commands
The following commands are available for Email Endpoints.
GET
Receive one or more files from the host
GET -DEL "source" "destination"
DEL | If the GET is successful, delete the remote file. |
source | Remote source path. If the path contains a space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). |
destination | CIC destination path.
|
PUT
Send one or more files to the host.
PUT "source" "destination"
source |
|
destination | Remote destination filename. If the destination contains a macro variable, space, dash (-), comma (,), or equal sign (=), it must be enclosed with double quotes ("..."). The use of macro variables is supported. See Using Macro Variables in CIC (Destination context) for a list of the applicable macros. |
OFTP Endpoint Commands
The following commands are available for the OFTP Endpoint when it is the destination.
GET
Receive one or more files or receipts from the host
GET
The GET command has no options for two reasons:
- Whether files or receipts (EERP) are received cannot be controlled.
- In OFTP, files and receipts can be received either solicited or unsolicited.
PUT
Send one or more files to the host search here
PUT –TEX|-UNS|-FIX|-VAR "source" "destination"
–TEX |
Transfer file in OFTP text format:
|
-UNS | Transfer file in OFTP unstructured format: There are several other parameters available for this format:
|
-FIX | Transfer file in OFTP fixed format. There are several other parameters available for this format:
|
-VAR | Transfer file in OFTP variable format. There are several other parameters available for this format:
|
"source" |
Source path
|
"destination" |
Remote destination path. The use of macro variables is supported. See Using Macro Variables in CIC (Destination context) for a list of the applicable macros. If no destination is specified, the command uses Default Virtual Filename under the OFTP Endpoint's Advanced Tab. If the Default Virtual Filename also not specified, the command uses the source filename. |
RNIF Endpoint Commands
PUT
Send one or more files to the host.
PUT -DEL "source" "destination" [pipCode]= .. [pipVersion]= .. [pipInstanceId]= .. [actionType]=request|response
-DEL |
If the PUT is successful, delete the local file. |
"source" |
Local source path.
|
"destination" |
Remote destination path
|
pipCode | The code for a PIP specification. Not needed if only one outgoing PIP. PIPs that can be used with a trading partner are activated and configured in the Inbound and Outbound PIPs list on the RNIF Endpoint page. See RNIF Endpoint for more information. |
pipVersion | Matches to a particular version of a PIP. Not needed if only one version of the PIP code is active. If no version is specified or the version is set to * , the first occurrence of a configured PIP is used. |
pipInstanceId | The PIP instance ID uniquely identifies each use of a PIP when documents are sent and received. Not needed for a request. This is really only needed for two-action PIPs in order to associate a response document with the original request document. If a PIP instance ID is not specified, CIC automatically generates one. |
actionType | Specifies the type of message being sent. Valid values are request and response . The default value is request . Specify response for the response of a two-action PIP. |
pipCode
, pipVersion
, pipInstanceId
, and actionType
parameters are not needed if an outgoing file wrapper is being used instead. Command Examples
SET with PostGetCommand example
The following SFTP-specific example shows how to use the SET command to set the PostGetCommand property, which specifies a command to be executed only after a successful GET. In this case, the PostGetCommand property specifies a QUOTE command, which in this case sends a raw RENAME command to FTP to move the file to the HISTORY directory.
SET PostGetCommand=QUOTE RENAME ${sourcefile} HISTORY\${sourcefilebase}${sourcefileext} CD order GET *.ord
So when these commands run, we CD to the order directory, GET files with the .ord extension, and if the GET is successful, we move each file to the HISTORY directory and the retrieved file content is passed to the destination of the Data Flow.
PUT command example
The following example of the PUT command sends files to multiple directories on one Endpoint.
PUT *855* POAckSell/ PUT *997* FA/
When these commands run, files with names that contain 885 are put in the POAckSell directory and files with names that contain 997 are put in the FA directory.
Comments
0 comments
Please sign in to leave a comment.