檔案傳送日誌訊息格式

檔案傳送日誌訊息會發佈至 SYSTEM.FTE 主題,主題字串為 Log/agent_name/transfer_ID。 這些訊息符合綱目 TransferLog.xsd,該綱目位於 WebSphere® MQ Managed File Transfer 安裝的 MQ_INSTALLATION_PATH/mqft/samples/schema 目錄中。

如果您要監視檔案傳送或收集其相關資料,請將訂閱設定為符合您感興趣的傳送的萬用字元主題。 例如:
Log/# 
Log/FTEAGENT/# 
這可以是可延續或不可延續的訂閱。 關閉訂閱應用程式與佇列管理程式的連線時,可延續訂閱會繼續存在。 不可延續訂閱只有在訂閱應用程式與佇列管理程式的連線開啟時才會存在。

綱目

下列綱目說明傳送日誌 XML 訊息中的有效元素。

<xsd:schema xmlns:xsd="https://www.w3.org/2001/XMLSchema">

    <xsd:include schemaLocation="fteutils.xsd"/>
 
    <xsd:element name="transaction">         
        <xsd:complexType>         	
            <xsd:sequence>         	    
                <xsd:element name="action"                type="actionType"          
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="sourceAgent"           type="agentExitStatusType"
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="sourceWebGateway"      type="webGatewayType"      
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="sourceWebUser"         type="webUserType"         
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="destinationAgent"      type="agentExitStatusType" 
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="destinationWebGateway" type="webGatewayType"         
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="destinationWebUser"    type="webUserType"         
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="agent"                 type="agentExitStatusType" 
                             maxOccurs="1"                minOccurs="0"/> 	        	
                <xsd:element name="originator"            type="origRequestType"     
                             maxOccurs="1"                minOccurs="1"/>         		
                <xsd:element name="status"                type="statusType"          
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="trigger"               type="triggerType"         
                             maxOccurs="1"                minOccurs="0" />         		
                <xsd:element name="transferSet"           type="transferSetType"     
                             maxOccurs="1"                minOccurs="1"/>         		
                <xsd:element name="job"                   type="jobType"             
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="scheduleLog"           type="scheduleLogType"     
                             maxOccurs="1"                minOccurs="0"/>         		
                <xsd:element name="statistics"            type="statisticsType"     
                             maxOccurs="1"                minOccurs="0"/>         	
            </xsd:sequence>         	
            <xsd:attribute name="version"   type="versionType"   	use="required"/> 			
            <xsd:attribute name="ID"        type="IDType"	    	use="required"/> 			
            <xsd:attribute name="relatedID" type="IDType"	    	use="optional"/> 			
            <xsd:attribute name="agentRole" type="agentRoleType"	use="optional"/>         
        </xsd:complexType>     
    </xsd:element>         

    <xsd:complexType name="agentExitStatusType">     	
        <xsd:complexContent> 			
            <xsd:extension base="agentType"> 				
                <xsd:sequence> 					
                    <xsd:element name="startExits" type="exitGroupType" minOccurs="0" maxOccurs="1"/> 					
                    <xsd:element name="endExits"   type="exitGroupType" minOccurs="0" maxOccurs="1"/> 					
                    <xsd:element name="systemInfo" type="systemInfoType" minOccurs="0" maxOccurs="1"/> 				
                </xsd:sequence> 	    	
            </xsd:extension>     	
        </xsd:complexContent>     
    </xsd:complexType>            

    <xsd:complexType name="transferSetType"> 		
        <xsd:sequence> 			
            <xsd:element name="metaDataSet"          type="metaDataSetType" 
                         maxOccurs="1"               minOccurs="0" /> 			
            <xsd:element name="call"                 type="callGroupType" 
                         maxOccurs="1"               minOccurs="0"/> 			
            <xsd:element name="preSourceCall"        type="callGroupType" 
                         maxOccurs="1"               minOccurs="0"/> 			
            <xsd:element name="postSourceCall"       type="callGroupType" 
                         maxOccurs="1"               minOccurs="0"/> 			
            <xsd:element name="preDestinationCall"   type="callGroupType" 
                         maxOccurs="1"               minOccurs="0"/> 			
            <xsd:element name="postDestinationCall"  type="callGroupType" 
                         maxOccurs="1"               minOccurs="0"/>             
            <xsd:element name="item"                 type="itemType" 
                         maxOccurs="unbounded"       minOccurs="0"/> 		
        </xsd:sequence> 		
        <xsd:attribute name="index"     type="xsd:nonNegativeInteger" use="optional" /> 		
        <xsd:attribute name="size"      type="xsd:nonNegativeInteger" use="optional" /> 		
        <xsd:attribute name="startTime" type="xsd:dateTime"           use="required" /> 		
        <xsd:attribute name="total"     type="xsd:nonNegativeInteger" use="required" /> 		
        <xsd:attribute name="bytesSent" type="xsd:nonNegativeInteger" use="required" />     
    </xsd:complexType>        

    <xsd:complexType name="itemType"> 		
        <xsd:sequence> 			
            <xsd:element name="source"      type="fileSourceChecksumType"		
                         maxOccurs="1"      minOccurs="1" /> 			
            <xsd:element name="destination" type="fileDestinationChecksumType"	
                         maxOccurs="1"      minOccurs="1" /> 			
            <xsd:element name="status"      type="statusType"       			
                         maxOccurs="1"      minOccurs="1" /> 		
        </xsd:sequence> 		
        <xsd:attribute name="mode" type="modeType" use="required" /> 	
    </xsd:complexType> 	 	   

    <xsd:complexType name="fileSourceChecksumType">     	
        <xsd:complexContent> 			
            <xsd:extension base="fileSourceType"> 				
                <xsd:sequence> 					
                    <xsd:element name="checksum" type="checksumType" minOccurs="0" maxOccurs="1"/> 				
                </xsd:sequence> 	    
            </xsd:extension>     	
        </xsd:complexContent>     
    </xsd:complexType>	      

    <xsd:complexType name="fileDestinationChecksumType">     	
        <xsd:complexContent> 			
            <xsd:extension base="fileDestinationType"> 				
                <xsd:sequence> 					
                    <xsd:element name="checksum" type="checksumType" 
                                 minOccurs="0"   maxOccurs="1"/> 				
                </xsd:sequence> 	    	
            </xsd:extension>     	
        </xsd:complexContent>     
    </xsd:complexType>	        

    <xsd:complexType name="actionType">         
        <xsd:simpleContent>     		
            <xsd:extension base="actionEnumType">         		
                <xsd:attribute name="time" type="xsd:dateTime" use="required" />         
            </xsd:extension>         
        </xsd:simpleContent>     
    </xsd:complexType>   

    <xsd:simpleType name="actionEnumType">     	
        <xsd:restriction base="xsd:token">     		
            <xsd:enumeration value="cancelled"/>     		
            <xsd:enumeration value="started"/>     		
            <xsd:enumeration value="progress"/>     		
            <xsd:enumeration value="completed"/>     		
            <xsd:enumeration value="malformed"/>     		
            <xsd:enumeration value="notAuthorized"/>     		
            <xsd:enumeration value="deleted"/>        	
        </xsd:restriction>     
    </xsd:simpleType>           

    <xsd:complexType name="systemInfoType">         
        <xsd:attribute name="architecture" type="xsd:string" use="required"/>         
        <xsd:attribute name="name"         type="xsd:string" use="required"/>         
        <xsd:attribute name="version"      type="xsd:string" use="required"/>     
    </xsd:complexType>          

    <xsd:element name="malformed">         
        <xsd:complexType>
            <xsd:sequence>         	    
                <xsd:element name="action"  type="actionType" 
                             maxOccurs="1"  minOccurs="1"/> 				
                <xsd:element name="agent"   type="agentExitStatusType"
                             maxOccurs="1"  minOccurs="0"/>         		
                <xsd:element name="status"  type="statusType" 
                             maxOccurs="1"  minOccurs="1"/>         	
            </xsd:sequence>         	
            <xsd:attribute name="version"   type="versionType"     use="required"/> 			
            <xsd:attribute name="ID"        type="IDType"          use="required"/> 			
            <xsd:attribute name="agentRole" type="agentRoleType"   use="required"/>         
        </xsd:complexType>     
    </xsd:element>         

    <xsd:element name="notAuthorized">         
        <xsd:complexType>         	
            <xsd:sequence>         	    
                <xsd:element name="action"      type="actionType" 
                             maxOccurs="1"      minOccurs="1"/>         	    
                <xsd:element name="originator"  type="origRequestType" 
                             maxOccurs="1"      minOccurs="1"/>         	    
                <xsd:element name="authority"   type="xsd:string" 
                             minOccurs="1"      maxOccurs="1"/>         		
                <xsd:element name="status"      type="statusType" 
                             maxOccurs="1"      minOccurs="1"/>         	
            </xsd:sequence>         	
            <xsd:attribute name="version"   type="versionType"    use="required"/> 			
            <xsd:attribute name="ID"        type="IDType"         use="required"/> 			
            <xsd:attribute name="agentRole" type="agentRoleType"  use="required"/>         
        </xsd:complexType>     
    </xsd:element>               

    <xsd:complexType name="statisticsType">         
        <xsd:sequence>                 
            <xsd:element name="actualStartTime" type="xsd:dateTime"           
                         maxOccurs="1"          minOccurs="0"/>                 
            <xsd:element name="retryCount"      type="xsd:nonNegativeInteger" 
                         maxOccurs="1"          minOccurs="1"/>                 
            <xsd:element name="numFileFailures" type="xsd:nonNegativeInteger" 
                         maxOccurs="1"          minOccurs="1"/>                 
            <xsd:element name="numFileWarnings" type="xsd:nonNegativeInteger" 
                         maxOccurs="1"          minOccurs="1"/>         
        </xsd:sequence>     
    </xsd:complexType>     

    <xsd:complexType name="webGatewayType"> 		
        <xsd:attribute name="webGatewayName"      type="xsd:string" use="optional" /> 		
        <xsd:attribute name="webGatewayAgentName" type="xsd:string" use="optional" /> 		
        <xsd:attribute name="webGatewayAgentQMgr" type="xsd:string" use="optional" /> 
    </xsd:complexType> 	 	

    <xsd:complexType name="webUserType"> 		
        <xsd:attribute name="webGatewayName"      type="xsd:string" use="required" /> 		
        <xsd:attribute name="webGatewayAgentName" type="xsd:string" use="optional" /> 		
        <xsd:attribute name="webGatewayAgentQMgr" type="xsd:string" use="optional" />        	 	
    </xsd:complexType>

</xsd:schema>

瞭解傳送日誌訊息

<transaction>
可指定您要一起執行的一組傳送的群組元素。
屬性 說明
version 指定此元素的版本,如 WebSphere MQ Managed File Transfer所詳述。
ID 指定唯一交易 ID。 ID 最多可為 48 個英數字元。
relatedID 選用項目。 如果交易是從檔案空間刪除或下載檔案,relatedID 可指定已將檔案上傳至檔案空間的傳送的交易 ID。
agentRole 選用項目。 指定相關的代理程式是否在來源或目的地系統上。
xmlns:xsi 名稱空間宣告。 指出此綱目中使用的元素及資料類型衍生自 "https://www.w3.org/2001/XMLSchema-instance" 名稱空間。
xsi:noNamespaceSchemaLocation 指定 XML 綱目文件的名稱及位置,以驗證此訊息中沒有名稱空間宣告。 您為此屬性指定的值必須參照 WebSphere MQ Managed File Transfer TransferLog.xsd 文件。
<action>
說明時間屬性記載的時間的檔案傳送狀態。 狀態可以是下列其中一值:
  • 已啟動
  • 進度
  • 已完成
  • 已取消
  • malformed(指示無法解譯檔案傳送要求訊息內容)
  • notAuthorized
  • deleted
屬性 說明
time 擷取傳送狀態的時間,以 UTC 格式表示。
<sourceAgent>
指定來源檔案所在系統上的代理程式名稱。 只能指定 <sourceAgent>、<sourceWebUser> 和 <sourceWebGateway> 的其中之一。
<startExits>
包含一個以上使用者結束程式元素的群組元素。 此元素只能出現一次。
<endExits>
包含一個以上使用者結束程式元素的群組元素。 此元素只能出現一次。
<systemInfo>
說明系統架構、名稱及版本。 此元素只能出現一次。
屬性 說明
代理程式 (agent) 來源系統上的代理程式名稱。
QMgr 來源系統上的佇列管理程式的名稱。
agentType 代理程式的類型。 有效值為:
  • STANDARD - 一般代理程式
  • BRIDGE - 通訊協定橋接器代理程式
  • CD_BRIDGE- Connect:Direct® 橋接器代理程式
  • EMBEDDED - 內嵌式代理程式
  • WEB_GATEWAY - Web 代理程式
  • SFG - Sterling File Gateway 內嵌式代理程式
bridgeURL 選用項目。 如果代理程式是通訊協定橋接器代理程式,則為管理通訊協定伺服器的系統的主機名稱。
pnode 選用項目。 如果代理程式是 Connect:Direct 橋接器代理程式,則為傳送中涉及的 Connect:Direct 主要節點名稱。
snode 選用項目。 如果代理程式是 Connect:Direct 橋接器代理程式,則為傳送中涉及的 Connect:Direct 次要節點名稱。
bridgeNode 選用項目。 如果代理程式是 Connect:Direct 橋接器代理程式,則為 Connect:Direct 橋接器的 Connect:Direct 節點名稱。 此節點與主要節點或次要節點相同。
<sourceWebUser>
指定將來源檔案上傳至 Web 閘道的 Web 使用者的名稱。 只能指定 <sourceAgent>、<sourceWebUser> 和 <sourceWebGateway> 的其中之一。
屬性 說明
webGatewayName 從 Web 使用者接收檔案的「Web 閘道」的名稱。
webGatewayAgentName 「Web 閘道」用於將檔案傳送至目的地的 Web 代理程式的名稱。
webGatewayAgentQMgr Web 代理程式的佇列管理程式名稱。
<sourceWebGateway>
指定從中下載來源檔案的「Web 閘道」的名稱。 只能指定 <sourceAgent>、<sourceWebUser> 和 <sourceWebGateway> 的其中之一。
屬性 說明
webGatewayName 從 Web 使用者接收檔案的「Web 閘道」的名稱。
webGatewayAgentName 「Web 閘道」用於將檔案傳送至目的地的 Web 代理程式的名稱。
webGatewayAgentQMgr Web 代理程式的佇列管理程式名稱。
<destinationAgent>
指定檔案傳送至其中的系統上的代理程式名稱。 只能指定 <destinationAgent>、<destinationWebGateway> 和 <destinationWebUser> 的其中之一。
屬性 說明
代理程式 (agent) 目的地系統上的代理程式名稱。
QMgr 目的地系統上的佇列管理程式名稱。
agentType 代理程式的類型。 有效值為:
  • STANDARD - 一般代理程式
  • BRIDGE - 通訊協定橋接器代理程式
  • CD_BRIDGE- Connect:Direct 橋接器代理程式
  • EMBEDDED - 內嵌式代理程式
  • WEB_GATEWAY - Web 代理程式
  • SFG - Sterling File Gateway 內嵌式代理程式
bridgeURL 選用項目。 如果代理程式是通訊協定橋接器代理程式,則為管理通訊協定伺服器的系統的主機名稱。
pnode 選用項目。 如果代理程式是 Connect:Direct 橋接器代理程式,則為傳送中涉及的 Connect:Direct 主要節點名稱。
snode 選用項目。 如果代理程式是 Connect:Direct 橋接器代理程式,則為傳送中涉及的 Connect:Direct 次要節點名稱。
bridgeNode 選用項目。 如果代理程式是 Connect:Direct 橋接器代理程式,則為 Connect:Direct 橋接器的 Connect:Direct 節點名稱。 此節點與主要節點或次要節點相同。
<startExits>
包含一個以上使用者結束程式元素的群組元素。 此元素只能出現一次。
<endExits>
包含一個以上使用者結束程式元素的群組元素。 此元素只能出現一次。
<systemInfo>
說明系統架構、名稱及版本。 此元素只能出現一次。
<destinationWebUser>
指定從「Web 閘道」下載檔案的 Web 使用者的名稱。 只能指定 <destinationAgent>、<destinationWebGateway> 和 <destinationWebUser> 的其中之一。
屬性 說明
webGatewayName 從 Web 使用者接收檔案的「Web 閘道」的名稱。
<destinationWebGateway>
指定從「Web 閘道」下載檔案的 Web 使用者的名稱。 只能指定 <destinationAgent>、<destinationWebGateway> 和 <destinationWebUser> 的其中之一。
屬性 說明
webGatewayName 從 Web 使用者接收檔案的「Web 閘道」的名稱。
webGatewayAgentName 「Web 閘道」使用的 Web 代理程式的名稱。
webGatewayAgentQMgr Web 代理程式的佇列管理程式名稱。
<originator>
群組元素,包含指定要求發送端的元素。
<hostName>
來源檔案所在系統的主機名稱。
<userID>
發出檔案傳送的使用者 ID。
<mqmdUserID>
在訊息描述子 (MQMD) 中提供的 IBM® WebSphere MQ 使用者 ID
<webUserID>
選用項目。 提供給提交傳送要求的 Web 瀏覽器的使用者 ID。
<webBrowser>
選用項目。 從中提交傳送要求的 Web 瀏覽器。
<status>
結果碼及補充訊息。

<trigger>
包含原始傳送要求中定義的觸發程式元素的群組元素。 這些元素可以是下列其中一個或全部:
<fileExist>
根據檔案是否存在觸發條件
<fileSize>
根據檔案符合或超過指定的大小觸發條件

<transferSet>
指定您想要一起執行的檔案傳送群組。 在傳輸期間,<transferSet> 是包含 <item> 元素的群組元素。
屬性 說明
startTime 記錄傳送集啟動的時間,以 UTC 格式表示。
total 指定此傳送集中的項目總數。
索引 (index) 選用屬性。 指定傳送集中進行的第一個項目的位置。 索引屬性從零開始增量。 比方說,例如索引設定為 1,則進度訊息為兩個項目的第二個。
大小 選用屬性。 指定進度報告中的項目數。
priority 選用屬性。 傳送的優先順序層次。 優先順序是範圍 0-9 中的值,其中 0 是最低優先順序。 預設優先順序層次為 0,依預設,傳送使用來源代理程式優先順序層次。
<metaDataSet>
包含一個以上下列屬性的群組元素:
<metaData>
屬性 說明
key meta 資料鍵值組一半的鍵。 <metaData> 元素內容包含配對的一半值。 例如,<metaData key="testkey1">testvalue1</metaData>
<job>
群組元素,包含指定工作詳細資料的元素。 <job> is a user-defined job name identifier that is added to the log message when the transfer has started. This <job> element is the same as the <job> element that is included in the transfer request message, which is described in the following topic: 檔案傳送要求訊息格式.
<name>
name 的值可以是任何字串。

<scheduleLog>
群組元素,包含指定來源及目的地檔案名稱和位置的元素。
屬性 說明
ID 與排程 ID 相符(如果傳送是排定的傳送)。
<item>
群組元素,包含指定來源及目的地檔案名稱和位置的元素。

<source>
包含來源系統上檔案的 <file> 元素或 <queue> 元素及 <checksum> 元素的群組元素。
屬性 說明
recursive 指定當 <source> 元素是目錄或包含萬用字元時,在子目錄中遞迴地傳送檔案。
disposition 指定當 <source> 已順利傳送至其目的地時,對 <source> 元素採取的動作。 有效選項如下所示:
  • leave - 來源檔案維持不變。
  • delete - 順利傳送來源檔案之後,即從來源系統中刪除來源檔案。
correlationBoolean 布林相關性值。 如果來源是 Connect:Direct 橋接器,這會指定 Connect:Direct 程序是否由使用者定義。
correlationString1 字串相關性值。 如果來源是 Connect:Direct 橋接器,這會指定在傳送目的地發生的 Connect:Direct 程序名稱。
correlationNum1 數字相關性值。 如果來源是 Connect:Direct 橋接器,這會指定在傳送目的地發生的 Connect:Direct 程序的 ID 號碼。
<queue>
在與 <source> 元素搭配使用時,指定從中讀取已傳送訊息的佇列名稱,此佇列位於來源代理程式的佇列管理程式上。
屬性 說明
messageCount 從佇列中讀取的訊息數。
groupId 從佇列讀取的訊息的 IBM WebSphere MQ 群組 ID。
<destination>
包含目的地之 <file> 元素或 <queue> 元素及 <checksum> 元素的群組元素。

只有 <file> 和 <queue> 其中之一呈現為目的地的子元素。

屬性 說明
類型
目的地的類型。 有效選項如下所示:
  • file - 指定檔案作為目的地
  • directory - 指定目錄作為目的地
  • queue-指定 IBM WebSphere MQ 佇列作為目的地

只有在 <destination> 元素具有 <file>的子元素時,選項檔案和目錄才會存在。

只有在 <destination> 元素具有 <queue>的子元素時,選項佇列才會存在。

exist
指定如果目的地系統上存在目的地檔案時要採取的動作。 有效選項如下所示:
  • error - 報告錯誤,且不傳送檔案。
  • overwrite - 改寫現有目的地檔案。

如果 <destination> 元素具有 <queue>的子元素,則無法呈現此屬性。

correlationBoolean 布林相關性值。 如果目的地是 Connect:Direct 橋接器,則會指定 Connect:Direct 程序是否為使用者定義的程序。
correlationString1 字串相關性值。 如果目的地是 Connect:Direct 橋接器,這會指定在傳送目的地發生的 Connect:Direct 程序名稱。
correlationNum1 數字相關性值。 如果目的地是 Connect:Direct 橋接器,這會指定在傳送目的地發生的 Connect:Direct 程序的 ID 號碼。
<file>
指定已傳送的檔案的絕對路徑(同時在來源及目的地上)。 完整路徑採用與您的作業系統一致的格式,例如,C:/from/here.txt。 不使用檔案 URI。
<queue>
在與 <destination> 元素搭配使用時,指定已傳送至其中的佇列名稱,此佇列位於連接至目的地代理程式佇列管理程式的任何佇列管理程式上。
屬性 說明
messageCount 寫入佇列的訊息數。
messageLength 寫入佇列的訊息長度。
groupId 如果傳送要求指定將檔案分割為多則訊息,則此屬性的值是寫入佇列之訊息的 IBM WebSphere MQ 群組 ID。
messageId 如果傳送要求未指定檔案分割為多則訊息,則此屬性的值是寫入佇列之訊息的 IBM WebSphere MQ 訊息 ID。
<checksum>
選用元素。

指定產生訊息摘要以建立數位簽章的雜湊演算法類型。 目前 WebSphere MQ Managed File Transfer 僅支援「訊息摘要」演算法 5 (MD5)。 總和檢查提供了讓您確認已傳送檔案的完整性是否完整的方法。

<malformed>
形態異常的訊息的群組元素。
屬性 說明
version
ID  
agentRole 來源代理程式或目的地代理程式
<statistics>
傳送的統計資訊的群組元素(可用時)。
<actualStartTime>
代理程式開始執行傳送的實際時間。 通常,此時間與記錄的傳送的啟動時間相同(或非常接近)。 但是,在代理程式忙碌時,提交的佇列可能會排在佇列中,直至代理程式可以執行傳送為止。
<retryCount>
傳送進入回復狀態及由代理程式重試的次數。 傳送可能進入回復狀態,因為來源與目的地代理程式失去通訊,可能是因為 IBM WebSphere MQ 網路錯誤,或因為它們在一段時間內未接收資料或確認通知訊息。 此期間由下列代理程式內容確定:transferAckTimeout 及 transferAckTimeoutRetries。
<numFileFailures>
transferSet 中無法順利傳送的檔案數。
<numFileWarnings>
在傳送時產生警告,但已順利傳送的 transferSet 中的檔案數。