Hello
thanks Wim,
it did not work.
Whenever someone else of us is interested:
the purpose is to get oc to execute a "win reg command".
The win command is contained in a cmd file called getsys.cmd
Content of getsys.cmd is as follows
@echo off
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment" /v PROCESSOR_ARCHITECTURE | find /i "x86" > nul
if %errorlevel%==0 (
echo 32-bit >c:\mystart\sistema
) else (
echo 64-bit >c:\mystart\sistema
)
display of return-code before call "SYSTEM" gives zero
call "SYSTEM" is done USING w-syscall
w-syscall is stringed as follows
call "comando" c:\mystart\getsys.cmd followed by a blank
before an x"00" (as Wim suggested)
call "SYSTEM" using w-syscall gives a return-code 127
Oc program writes getsys.cmd as a line sequential file.
After getsys.cmd close, a call "CBL_OC_NANOSLEEP" using 5000000000
is performed
After call "SYSTEM" using w-syscall and before opening
c:\mystart\sistema, a new call "CBL_OC_NANOSLEEP" using 5000000000
is performed but no c:\mystart\sistema is produced.
From windows cmd prompt, getsys.cmd works as expected.
Regards,
marcellom
Il 10/07/2013 14:09, Wim Niemans ha scritto:
Make sure your command line in working storage contains a NULL (low-value)
character at the end.
Op 10 jul. 2013, om 13:17 heeft marcellom het volgende geschreven:
Hello,
I am unable to exec a call "SYSTEM" in cygwin.
Os is windows 7 64 bits, cygwin version is "CYGWIN_NT-6.1-WOW64
1.7.20(0.266/5/3) 2013-06-07 11:11 i686".
As an example:
cmdtoexec is full path to a previously builded .cmd file
cmdtoexec, if executed from a cmd prompt executes regularely
string
"start " delimited size
'"comando" ' delimited size
cmdtoexec delimited spaces
into w-syscall
end-string
resulting w-syscall is start "comando" c:\mystart\mycomand.cmd
but call "SYSTEM" using w-syscall does not execute.
I tried also
move cmdtoexec to w-syscall
so that w-syscall contains c:\mystart\mycommand.cmd
unsuccessfully.
Some one of us has any suggestion?
Thanks
Marcellom
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list