我在批处理模式下运行DXL时遇到问题
门:断言失败,第3173行,document.cpp:!nls _("意外:树根没有名称属性")堆栈:
我的批处理文件如下
set arg1=%1
set arg2=%2
set arg1=%arg1:"=%
set arg2=%arg2:"=%
start "DOORS" "C:\Program Files\IBM\Rational\DOORS\9.6\bin\doors.exe" -d ABCD -u xxxxx -P xxxx -b "C:\\doNothing.dxl" -dxl "string s_ModListPath = \"%arg1%\";string CRNUM = \"%arg2%\";#include <C:\\Users\\ObjectsList.dxl>"
我通过传递参数来从命令行运行这个批处理文件,如下所示
C:\Users\ObjectsCmnd.bat C:\\TEMP\\ModulesSelected.txt 12345
请告诉我我在做什么错,以及为什么我收到错误
OBjectList.dxl
pragma encoding, "UTF-8"
pragma runLim,0
Buffer b_ModPath
string s_ModPath
string s_Log = "C:\\TEMP\\ObjectList.txt"
string s_OutPutLog = "C:\\TEMP\\MDPRLog.txt"
Object o
bool b1 = canOpenFile(s_ModListPath,false)
bool b2 = canOpenFile(s_Log,true)
bool b3 = canOpenFile(s_OutPutLog,true)
if(!b1)
{
print "cannot open file to read the module list \n"
}
if(!b2)
{
print "cannot open file to write the objectlist \n"
}
if(!b3)
{
print "cannot open file to write the MDPRlog under temp"
}
Stream st = read s_ModListPath
Stream Output = write s_Log
Stream Log = write s_OutPutLog
void fn_Main()
{
while(!end st)
{
b_ModPath = create
st >= b_ModPath
s_ModPath = stringOf(b_ModPath)
Module m = read(s_ModPath,false)
if(null m)
{
Log << "null module path " s_ModPath "\n"
continue
}
//noError()
current = m
if(!exists(attribute("Change_Request_ID")))
{
Log << "Attr Change_Request_ID doesnt exist in module " s_ModPath "\n"
continue
}
if(!null m)
{
//current = m
Filter CRObjects = contains(attribute "Change_Request_ID",CRNUM,false) && attribute "CC_Status" == "Frozen"
set (m, CRObjects, acceptedObjs, rejectedObjs)
filtering on
if (acceptedObjs <= 0)
{
Log << "No objects that contain CR and CC_Staus frozen \n"
}
for o in m do
{
Output << fullName(m) ";" identifier(o) "\n"
}
filtering off
}
else
{
Log << "Null module " s_ModPath "\n"
}
close m
}
delete b_ModPath
}
fn_Main()
Log << "-------- ObjectList Completed ------------- \n"
close st
close Log
close Output