infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
How do I get the inbound file name in a tcl
Gene Millard
I have a new process where files with different names will be placed in the same directory.
Each file will be processed differently.
How can I get the Inbound file name from the metadata?
Gene Millard
Find more posts tagged with
Clovertech
Comments
Keith McLeod
Protocol Driver Control holds this value. You can see it in SMATDB using metdata tab. It will depend where you need to grab the filename from. If from a tclproc, then you would use msgmetaget command. If from inside an xlate xpmmetaget.
I believe msgmetaget $<your filehandle> DRIVERCTL
In an Xlate, xpmmetaget $xlateId DRIVERCTL
Should help getting you the info....
Gene Millard
I got it to work.
Thank you
Jim Kosloskey
IBFILE I believe is the key for the IB Filename within the DRIVERCTL Keyed List.
Gene Millard
I am able to get the entire path with
set driverCtl [msgmetaget $mh DRIVERCTL]
set ibFileName [keylget driverCtl FILENAME]
but I cannot get just the inbound file name with
set ibFileName [keylget driverCtl IBFILE]
[sms :sms :ERR /0:toAtaArchiveAfterProcess:03/10/2022 12:00:59] Tcl error:
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] msgId = message0
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] proc = 'tpsSetFromOracleFileName'
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] args = ''
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] result = 'key "IBFILE" not found in keyed list'
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] errorInfo: '
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] key "IBFILE" not found in keyed list
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] while executing
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] "keylget driverCtl IBFILE"
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] (procedure "tpsSetFromOracleFileName" line 17)
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] invoked from within
[sms :sms :ERR /0:toAtaArchiveAfterProcess:--/--/---- --:--:--] "tpsSetFromOracleFileName {MSGID message0} {CONTEXT sms_ob_data} {ARGS {}} {MODE run} {VERSION 3.0}"'
Boris Perov
We just use "file tail"
set driverCtl [msgmetaget $mh DRIVERCTL]
set ibFileName [keylget driverCtl FILENAME]
set filename [file tail $ibFileName]
Jim Kosloskey
Ah my mistake. FILENAME is the Key not IBFILE.
Thanks Boris.
Gene Millard
The file tail code worked.
Thank you