Using intrinsic symbolic variables in Connect:Direct processes that are called by WebSphere MQ File Transfer Edition

You can call a user-defined Connect:Direct® process from a WebSphere® MQ File Transfer Edition transfer and pass in information from the transfer to the Connect:Direct process by using intrinsic symbolic variables in the process definition.

About this task

This example uses intrinsic symbolic variables to pass information from a WebSphere MQ File Transfer Edition transfer in to a user-defined Connect:Direct process. For more information about intrinsic symbolic variables used by WebSphere MQ File Transfer Edition, see Substitution variables for use with user-defined Connect:Direct processes.

In this example, the file is transferred from a WebSphere MQ File Transfer Edition agent to a Connect:Direct bridge node. The first part of the transfer is performed by WebSphere MQ File Transfer Edition. The second part of the transfer is performed by a user-defined Connect:Direct process.

Procedure

  1. Create a Connect:Direct process that uses intrinsic symbolic variables.
    %FTEPNAME PROCESS 
    	SNODE=%FTESNODE
    	PNODEID=(%FTEPUSER,%FTEPPASS)
    	SNODEID=(%FTESUSER,%FTESPASS)
    
    COPY001 COPY 
    	FROM (
    		FILE=%FTEFFILE
    		DISP=%FTEFDISP
    	)
    	TO (
    		FILE=%FTETFILE
    		DISP=%FTETDISP
    	)
    PEND 
  2. Save this process to a text file at the following location: configuration_directory/coordination_queue_manager/agents/cd_bridge_agent/Example.cdp
  3. Edit the ConnectDirectProcessDefinition.xml file to include a rule that calls the Connect:Direct process that you created in Step 1.
    <?xml version="1.0" encoding="UTF-8"?>
    <tns:cdprocess xmlns:tns="http://wmqfte.ibm.com/ConnectDirectProcessDefinitions"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://wmqfte.ibm.com/ConnectDirectProcessDefinitions ConnectDirectProcessDefinitions.xsd">                 
                        	
        <tns:processSet> 		
            <tns:condition> 			
                <tns:match variable="%FTESNODE" value="TOBERMORY" pattern="wildcard" /> 			 
            </tns:condition> 		
            <tns:process> 			
                <tns:transfer process="Example.cdp" /> 		
            </tns:process> 	
        </tns:processSet> 	 	
    
    </tns:cdprocess>

    In this example, if a transfer request is submitted to the Connect:Direct bridge agent that has TOBERMORY as its source or destination Connect:Direct node, the Example.cdp Connect:Direct process is called.

  4. Submit a file transfer request that satisfies the conditions that you defined in the ConnectDirectProcessDefinition.xml file in Step 3. For example,
    fteCreateTransfer -sa ORINOCO -da CD_BRIDGE 
                      -sm QM_WIMBLEDON -dm QM_COMMON 
                      -de overwrite -df TOBERMORY:/home/bulgaria/destination.txt 
                      -sd leave c:\bungo\source.txt

    In this example, the destination Connect:Direct node is TOBERMORY. This node is the secondary node in the transfer and the value of %FTESNODE is set to TOBERMORY. This command matches the condition that is set in the ConnectDirectProcessDefinition.xml file.

  5. WebSphere MQ File Transfer Edition transfers the source file to a temporary location on the same system as the Connect:Direct bridge agent.
  6. The Connect:Direct bridge agent sets the values of the intrinsic symbolic variables from the information in the transfer request and configuration information. The intrinsic symbolic variables are set to the following values:
    • %FTEPNAME=process_name - This value is an 8 character process name generated by the Connect:Direct bridge agent.
    • %FTESNODE=TOBERMORY - This value is set from the -df parameter of the fteCreateTransfer command.
    • %FTEPUSER,=primary_node_user - This information is taken from the ConnectDirectCredentials.xml file.
    • %FTEPPASS=primary_node_user_password - This information is taken from the ConnectDirectCredentials.xml file.
    • %FTESUSER,=secondary_node_user - This information is taken from the ConnectDirectCredentials.xml file.
    • %FTESPASS=secondary_node_user_password - This information is taken from the ConnectDirectCredentials.xml file.
    • %FTEFFILE =temporary_location - This value is the temporary location of the file on the same system as the Connect:Direct bridge agent.
    • %FTEFDISP=leave - This value is set from the -sd parameter of the fteCreateTransfer command.
    • %FTETFILE=/home/bulgaria/destination.txt - This value is set from the -df parameter of the fteCreateTransfer command.
    • %FTETDISP=overwrite - This value is set from the -de parameter of the fteCreateTransfer command.
  7. The Connect:Direct process is started on the Connect:Direct bridge node. Connect:Direct transfers the file from the temporary location on the Connect:Direct bridge system to the destination /home/bulgaria/destination.txt on the system where the Connect:Direct node TOBERMORY is running.

Task Task

Feedback

Timestamp icon Last updated: Tuesday, 30 January 2018
http://www.ibm.com/support/knowledgecenter/SSEP7X_7.0.4/com.ibm.wmqfte.doc/cd_var_sub_ex.htm