Date/time stamp in file name created by MIM in destination list
I'm trying to append a date/time stamp to the name of a file MIM is creating in a destination list but no substitution is taking place. I'm using the ${gmtDate}${gmtTime} variable, but that literal is appended to the file name (if the file name is TESTFILE.TXT and I use want to append the name with the time stamp, I put TESTFILE_${gmtDate}@${gmtTime}.TXT.....but the substitution doesn't happen in the destination list....but it does work in a request template, straight FTF). How can I do this in a dlist?
Comments
-
Mark,
See this example for how you can use an exit to perform this functionality:
0 -
Can't seem to find the replaceFileName script in our registry or in our bin file. mvh
0 -
It is attached to the post in the referred-to article.
0 -
594b5121-666a-7161-5347-5b4251665f5f
cf005791-1a81-47af-b50e-f6bf1e272aaa
Pre_Sender_Exit_Point
-1
0
Exception
'{' parenthesis expected in line 54{
var temp=strPolicy;
Date::new();
temp=temp.gsub("\\${gmtDate}",Date.gmtDate);
temp=temp.gsub("\\${gmtTime}",Date.gmtT
Depends on exception thrown!0 -
Yes, there was a problem with my example. I have updated it, and reposted it to the original message.
0 -
Still no luck. Using the new replaceFileName script I receive the following error:
activity Pre_Sender_Exit_Point
locationCode Exception locationCode
message 'strPolicy' undeclared identifier in line 31var temp=strPolicy;
Date::new();
temp=temp.gsub("\\${gmtDate}",Date.gmtDate);
temp=temp.gsub("\\${gmtTime}",Date.gmtTime);Line 31 of the script appears as
temp = temp.gsub("\\${SECOND}",rightJustify(Date.second,2.'0'));I see no error.
0 -
When I run the replaceFileName.xms script, I receive the same error:
XMOException: XMScriptException
'strPolicy' undeclared identifier in line 22
doVariableSubstitution(strPolicy)
{
var temp=strPolicy;
Date::new();
temp=temp.gsub("\\${gmtDate}",Date.gmtDate);
temp=temp
Error Code:103
(:21)
VM terminated with rc = 2000
0 -
Can you post your "Request XML" from the Process Monitor Request entry?
0 -
<?xml version="1.0" encoding="UTF-8"?>
EIDTHDQ01WT_QM
ZEIDQHDQ00W_QM
trans_qa
EIDTHDQ01WT_QM
xmdir://EDI210_2WDTRANS_Q2F.XML
/home/ra/cqcomm/in/EDI210_${gmtDate}_${gmtTime}.dat
TEXT
640
TRUE
5
1
1
5
replaceFileName
replaceFileName
EIDTHDQ01WT_QM
Pre_Rec_Exit_Point
mqsid0 -
Please run the following from a command line and post the results:
xmoscrpt replaceFileName.xms -etestreplaceFileName -x
0 -
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.N:\>xmoscrpt replaceFileName.xms -etestreplaceFileName -x
PM XMScript V 8.1.86.14
Copyright (c) 1997 - 2008 Metastorm, Inc., All Rights Reserved.
Not Compiled
XMOException: XMScriptException
'strPolicy' undeclared identifier in line 31var temp=strPolicy;
Date::new();
temp=temp.gsub("\${gmtDate}",Date.gmtDate);
temp=temp.gsub("\${gmtTime}",Date.gmtTime);Error Code:103
(:30)VM terminated with rc = 2000
N:\>
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 156 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories