Before you begin
- Ensure that WebSphere® MQ is installed
on the same machine as your integration node. Information about file
transfers is held on storage queues that are controlled by WebSphere MQ, so you must install WebSphere MQ on the same computer as your
integration node if you want to use the capabilities provided by the CDOutput node.
- Ensure that a queue manager has been specified on the integration
node; this queue manager will own the system queues that store information
about the file transfer. For information about specifying a queue
manager on the integration node, see mqsicreatebroker command.
- Create the system queues that will store the file transfer information.
For more information about creating the system queues, see Creating the default IBM Integration Bus queues on a WebSphere MQ queue manager.
- Create a message flow containing a CDOutput node; for example,
create a simple flow containing an MQInput connected to a CDOutput node.
About this task
Multiple CDOutput nodes
can be deployed to the same integration server, or to different integration
servers in the same integration node. CDOutput nodes can send one
file per transfer. Each file can have multiple records; each record
can have multiple elements. Transfers from the CDOutput node are non-blocking.
Procedure
- Set the required node properties on the CDOutput node.
If
you set the
Destination file name only,
and leave all the other options at their default values, the file
is transferred:
- From the primary Connect:Direct server (PNODE)
back to itself
- Into the default transfer directory using the default process
name.
Additionally, the file is created if it does not exist, or replaced
if it already exists.
The following table summarizes the
CDOutput node properties that
you can set, on which tab they appear, and a value that you can select:
Tab |
Property |
Value |
Basic |
Process name |
You can use any name you want for the process.
Note, however, that the name must be a maximum of eight characters
and cannot contain any spaces. |
SNODE |
The secondary Connect:Direct server to which the file is being
transferred. |
Destination
file directory |
TestDir on
secondary Connect:Direct server (SNODE). |
Destination
file name |
Filename on
secondary Connect:Direct server (SNODE). |
Disposition |
RPL |
Transfer mode |
Text mode |
- Setup the username and password that
is required for the CDOutput node
to connect to the primary Connect:Direct server using
the mqsisetdbparms command.
- Deploy the message flow to the integration node. See Packaging and deploying.
- Send the file to the In terminal of the CDOutput node.
Results
The following actions occur when you perform these steps:
- The file is constructed in accordance with the values set in the
properties of the CDOutput node.
- The file is staged in the local file system and then a command
is sent to the Connect:Direct server to cause
the transfer to occur.
- If a file of the same name exists in the selected directory on
the secondary Connect:Direct server, the
processing of the existing file is determined by the value of the Disposition property;
in this example, the file is replaced.
Once the transfer has completed
the local, staged file is deleted.
Note, that when sending a file, you can dynamically set the
following properties:
- Secondary Connect:Direct server
(SNODE)
- Process name
- Accounting data
- Destination file directory
- Destination file name
- Copy from options
- Copy to options
You have complete control of the Copy statements.
For
example:
LocalEnvironment.Destination.CD.Copy.To.Option.PERMISS = '777'
causes
IBM Sterling Connect:Direct to set the permissions on the
destination file to
777 (or
RWX RWX RWX)
if the destination file is on a
UNIX operating
system, or within Unix System Services on
z/OS®.
However, if you enter
an incorrect format, a syntax error is detected when the process script
is submitted and this causes an error to be thrown in the node.
For
example:
LocalEnvironment.Destination.CD.Copy.To.Option.PERMISS = '7xddd'
causes a syntax error because
'7xddd' is
not of the format
nnn. When an error occurs the process
script is available in the exception thrown and the user trace.
Tip: To help you with problem determination, you can view the
script generated by the CDOutput node
by turning on user trace.