I developed a two dxl scripts:
1)first one creates several text files and then writes the link mapping info for all modules.
2)Second one reads the newly created text file and deletes/creates all links including linkset pairing and linkset. So far life is GOOD!!!
After operation is completed, the project folder and all the text files gets locked. if I try to run the dxl another time, dxl give me a dxl error message that "no permission is available to read the text files." I am also unable to delete the project folder from the database until I restart DOORS.
I have closed all modules and all text files after dxl operation is completed.
what i am missing. How I can check what is locking the database and text files.
Please help!!!
FZ
faisal.zahidi@boeing.com - Thu Jul 21 19:44:58 EDT 2011 |
|
Re: Locking the text file and DOORS database llandale - Fri Jul 22 12:40:45 EDT 2011
You may need to post the DXL, or at least the parts dealing with the text file access. I'm guessing its still open.
|
|
Re: Locking the text file and DOORS database faisal.zahidi@boeing.com - Tue Jul 26 14:01:20 EDT 2011 llandale - Fri Jul 22 12:40:45 EDT 2011
You may need to post the DXL, or at least the parts dealing with the text file access. I'm guessing its still open.
void MasterCommand(DB dbMain)
{
int ckOpt = get(ck)
int LnkMODMax=10
string lkname,modname
Stream input
Stream lnkfile
string linkModpath=null
Module linkMod
string srcModPath,tgtModPath
bool validrun=false
Stream logfilename
// string sFileName = get(inFileDbe)
MESSAGE_LEVEL = ckOpt
string libfile=get inFileDbe
input =read libfile
progressStart(dbMain, "Create linkset pairing","something",LnkMODMax)
for(input>>lkname;!end input;input>>lkname)
{
// if(fileExists_(lkname))
// {
linkModpath= parseLnkksetpath(lkname)
logpath=parselogpath(lkname)
logFilename=parseOLMfileName(lkname)
generatelogfile(logpath)
lnkfile=read lkname
for(lnkfile>>modname;!end lnkfile;lnkfile>>modname)
{
// if(fileExists_(modname))
// {
progressStep(LnkMODMax++)
progressMessage("Creating Linkset pairing after reading link file "logFilename)
validrun=true
srcModPath=parsesrcpath(modname)
tgtModPath=parsetrgpath(modname)
linkMod=edit(linkModpath,false)
createLinksetPairing(srcModPath, tgtModPath, linkModpath)
if(progressCancelled)
{
if (confirm("Exit loop?"))
{
progressStop
halt
}
}
srcModPath=null
trtModPath=null
totalcnt++
// }
// else
// {
// pdiag("ERROR: Cannot find linkset pairing info. Process skiped for the link module\n",0)
// }
}
close(lnkfile)
if(length(logBuff)>0)
{
if(fileExists_(logpath))
{
fileLog << logBuff""
close fileLog
setempty(logBuff)
}
else
{
pdiag("ERROR: Cannot find logfile. No log info is captured\n",0)
}
}
if(open module linkModpath)
{
save(linkMod)
close(linkMod)
}
// }
// else
// {
// pdiag("ERROR: Cannot find linkset file. Process skiped for link module\n",0)
// }
}
close(input)
progressStop
infoBox(" Update Complete.\nProcessed " ValidRuncnt " of total " totalcnt " inkset pairing. " )
if(validrun)
{
release(dbMain)
destroy(dbMain)
}
delete(logBuff)
}
|
|
Re: Locking the text file and DOORS database OurGuest - Tue Jul 26 14:33:47 EDT 2011 faisal.zahidi@boeing.com - Tue Jul 26 14:01:20 EDT 2011
void MasterCommand(DB dbMain)
{
int ckOpt = get(ck)
int LnkMODMax=10
string lkname,modname
Stream input
Stream lnkfile
string linkModpath=null
Module linkMod
string srcModPath,tgtModPath
bool validrun=false
Stream logfilename
// string sFileName = get(inFileDbe)
MESSAGE_LEVEL = ckOpt
string libfile=get inFileDbe
input =read libfile
progressStart(dbMain, "Create linkset pairing","something",LnkMODMax)
for(input>>lkname;!end input;input>>lkname)
{
// if(fileExists_(lkname))
// {
linkModpath= parseLnkksetpath(lkname)
logpath=parselogpath(lkname)
logFilename=parseOLMfileName(lkname)
generatelogfile(logpath)
lnkfile=read lkname
for(lnkfile>>modname;!end lnkfile;lnkfile>>modname)
{
// if(fileExists_(modname))
// {
progressStep(LnkMODMax++)
progressMessage("Creating Linkset pairing after reading link file "logFilename)
validrun=true
srcModPath=parsesrcpath(modname)
tgtModPath=parsetrgpath(modname)
linkMod=edit(linkModpath,false)
createLinksetPairing(srcModPath, tgtModPath, linkModpath)
if(progressCancelled)
{
if (confirm("Exit loop?"))
{
progressStop
halt
}
}
srcModPath=null
trtModPath=null
totalcnt++
// }
// else
// {
// pdiag("ERROR: Cannot find linkset pairing info. Process skiped for the link module\n",0)
// }
}
close(lnkfile)
if(length(logBuff)>0)
{
if(fileExists_(logpath))
{
fileLog << logBuff""
close fileLog
setempty(logBuff)
}
else
{
pdiag("ERROR: Cannot find logfile. No log info is captured\n",0)
}
}
if(open module linkModpath)
{
save(linkMod)
close(linkMod)
}
// }
// else
// {
// pdiag("ERROR: Cannot find linkset file. Process skiped for link module\n",0)
// }
}
close(input)
progressStop
infoBox(" Update Complete.\nProcessed " ValidRuncnt " of total " totalcnt " inkset pairing. " )
if(validrun)
{
release(dbMain)
destroy(dbMain)
}
delete(logBuff)
}
Doesn't look like you ever closed logfilename
|
|