Operating System - OpenVMS
1828216 Members
2384 Online
109975 Solutions
New Discussion

Re: running an exe with an option

 
SOLVED
Go to solution
labadie_1
Honored Contributor

running an exe with an option

I have an .exe that I run as
$ myexe :== $ disk:myexe
$ myexe par1 par2 par3

If I want to run it with /nodebug, my parameters will be messed in the program.

Apart from modifying the source code, if somebody has a smart idea to run it.

I tried
$ myexe/nodebug par1 par2 par3
and
$ myexe par1 par2 par3/nodebug

but it messes my parameters.


6 REPLIES 6
Ian Miller.
Honored Contributor
Solution

Re: running an exe with an option

you could change the image header with
http://vms.process.com/scripts/fileserv/fileserv.com?SET_EXE
to turn off running with debug
____________________
Purely Personal Opinion
Ian Miller.
Honored Contributor

Re: running an exe with an option

I think this feature (change DEBUG flag in image header) may be on the the list to get added to VMS as a proper command.
____________________
Purely Personal Opinion
Willem Grooters
Honored Contributor

Re: running an exe with an option

gerard,

perhpas use TWO foreign symbols: on to run the program WITH debug, the other without:

myexe :== $disk:myexe/NODEBUG
myexed :== $disk:myexe/DEBUG

Willem
Willem Grooters
OpenVMS Developer & System Manager
Uwe Zessin
Honored Contributor

Re: running an exe with an option

That does not work for me:

$ a=="$sys$login:a/nodebug"
$ a

OpenVMS Alpha Debug64 Version V7.3-200

%DEBUG-I-INITIAL, Language: C, Module: A
%DEBUG-I-NOTATMAIN, Type GO to reach MAIN program

DBG>


On VAX I once received code for a 'dummy debugger', so I could do:
$ define lib$debug dev:[dir]ddbg.exe
$ foreign_cmd
.
Amit Levin_2
Occasional Advisor

Re: running an exe with an option

Hi, I would try:
$ link/nodeb myexe
$ myexe:= $myexe.exe
$ myexe par1 par2 ...
Antoniov.
Honored Contributor

Re: running an exe with an option

Hi Labadie,
to execute debugger session with parameters you could:
$ MYEXE=="$MYEXE.EXE"
$ DEBUG/KEEP
$ RUN/COMMAND="MYEXE"/ARG="PAR1 PAR2 PAR3"
$ GO
You can define DBG$INIT to a debug startup command file as follow:
$ TYPE SYS$INPUT /OUT=MYDEBUG_STARTUP.COM
GO
GO
^Z
$ When debug start, execute GO twice time and program start immediatly. At end you need type EXIT to return back DCL.

H.T.H.
Antonio Vigliotti
Antonio Maria Vigliotti