Hongle Sun wrote:Is there any ways to generate a Message Control ID in MSH10 while inbound message hits the interface eninge, the reason is the inbound system doesnot have a msg control id in it? Thanks
Hongle Sun wrote:
... code ...# Get the message IDset midList [msgmetaget $mh MID]keylget midList NUM midset msgId $timeStamp$mid... code ...
####################################################################### Name: tps_setMsgId# Purpose: <description># UPoC type: tps# Args: tps keyedlist containing the following keys:# MODE run mode ("start", "run" or "time")# MSGID message handle# ARGS user-supplied arguments:# <describe user-supplied args here>## Returns: tps disposition list:# <describe dispositions used here>#proc tps_setMsgId { args } { keylget args MODE mode ;# Fetch mode set dispList {} ;# Nothing to return switch -exact -- $mode { start { # Perform special init functions # N.B.: there may or may not be a MSGID key in args } run { # 'run' mode always has a MSGID; fetch and process it keylget args MSGID mh set messageTs [clock format [clock seconds] -format %Y%m%d%H%M%S] # Get the Cloverleaf message ID (mid) set midList [msgmetaget $mh MID] keylget midList NUM mid puts "MSH.10: $mid$messageTs" lappend dispList "CONTINUE $mh" } time { # Timer-based processing # N.B.: there may or may not be a MSGID key in args } shutdown { # Doing some clean-up work } } return $dispList}
Originally posted by Steve Pringle
Originally posted by Highland Dave