run script automatically in DOORS

Hey,

could anyone help me with some advices of how should i try to run a script automatically from a batch file.

also there appears a syntax error when i try to use -D for my dxl file.
Horatiu1 - Wed Jul 18 03:15:36 EDT 2012

Re: run script automatically in DOORS
llandale - Wed Jul 18 12:52:48 EDT 2012

First put your script in a file and get it to work normally on-demand. Then try to get it to work batch, issuing:
  • ..\doors.exe -b "c:\MyFolder\MyDxl\MyBatchProgram.dxl"
Notice the "-b" switch expects the name of a file. You cannot do this (insert code)
  • ..\doors.exe -b "print(\"Hello in batch\")"

Other switches expect actual DXL, which would look like this:
  • ..\doors.exe -cli "#include <c:\MyFolder\MyDxl\MyBatchProgram.dxl>"

Batch programs have no "GUI" and so "infoBox" etc don't work. Sometimes a program will work on-demand but not in batch for other reasons; I don't recall all the nuance differences.

-Louie

Re: run script automatically in DOORS
Horatiu1 - Thu Jul 19 04:34:36 EDT 2012

llandale - Wed Jul 18 12:52:48 EDT 2012
First put your script in a file and get it to work normally on-demand. Then try to get it to work batch, issuing:

  • ..\doors.exe -b "c:\MyFolder\MyDxl\MyBatchProgram.dxl"
Notice the "-b" switch expects the name of a file. You cannot do this (insert code)
  • ..\doors.exe -b "print(\"Hello in batch\")"

Other switches expect actual DXL, which would look like this:
  • ..\doors.exe -cli "#include <c:\MyFolder\MyDxl\MyBatchProgram.dxl>"

Batch programs have no "GUI" and so "infoBox" etc don't work. Sometimes a program will work on-demand but not in batch for other reasons; I don't recall all the nuance differences.

-Louie

@echo off
"C:\Program Files\IBM\Rational\DOORS\9.2\bin\doors.exe" -f "C:\TEMP" -u "user" -P "userpass" -d 36677@s31aes -D "current = read("/CAMERA 2 - Challenge L7/1112_I200/70_System_Test/System Test Specification",true);#include <ImportXML-TestRun_Camera.dxl>"
pause
this is the code i have used.
so i manage to open doors from my batch file but i am not able to run automatically my TestRun.
i also receive the message: -E- DXL: <Line:1> syntax error

Re: run script automatically in DOORS
SystemAdmin - Thu Jul 19 04:49:06 EDT 2012

Horatiu1 - Thu Jul 19 04:34:36 EDT 2012
@echo off
"C:\Program Files\IBM\Rational\DOORS\9.2\bin\doors.exe" -f "C:\TEMP" -u "user" -P "userpass" -d 36677@s31aes -D "current = read("/CAMERA 2 - Challenge L7/1112_I200/70_System_Test/System Test Specification",true);#include <ImportXML-TestRun_Camera.dxl>"
pause
this is the code i have used.
so i manage to open doors from my batch file but i am not able to run automatically my TestRun.
i also receive the message: -E- DXL: <Line:1> syntax error

This is just because of the quotation marks ".

DOS (or Windows) first analyzes the tokens of your command.
You have one string that begins with
current =
and ends with
read (
because it is surrounded by "

This is not what you wanted.
Try to escape the " inside your DXL-Command with a \
 

@echo off
"C:\Program Files\IBM\Rational\DOORS\9.2\bin\doors.exe" -f "C:\TEMP" -u "user" -P "userpass" -d 36677@s31aes -D "current = read(\"/CAMERA 2 - Challenge L7/1112_I200/70_System_Test/System Test Specification\",true);#include <ImportXML-TestRun_Camera.dxl>"
pause

Re: run script automatically in DOORS
llandale - Thu Jul 19 15:58:59 EDT 2012

Horatiu1 - Thu Jul 19 04:34:36 EDT 2012
@echo off
"C:\Program Files\IBM\Rational\DOORS\9.2\bin\doors.exe" -f "C:\TEMP" -u "user" -P "userpass" -d 36677@s31aes -D "current = read("/CAMERA 2 - Challenge L7/1112_I200/70_System_Test/System Test Specification",true);#include <ImportXML-TestRun_Camera.dxl>"
pause
this is the code i have used.
so i manage to open doors from my batch file but i am not able to run automatically my TestRun.
i also receive the message: -E- DXL: <Line:1> syntax error

This is not batch. The "-D" switch runs the dxl after startup. You will find that you can see DOORS, and since you open the module visibly you will also see your module. DOORS will stay open.

  • Open your module Invisibly; and I suggest loading the standard view <read(name, false, true)>
  • try to add ";exit_" at the end of your string.

Batch is the "-b" switch which will close DOORS when done.

-Louie