gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Oc cygwin.


From: studiok
Subject: Re: [open-cobol-list] Oc cygwin.
Date: Thu, 11 Jul 2013 11:52:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

Hello,
my mistake.
w-syscall is
      start "comando" c:\mystart\getsys.cmd
marcellom

Il 11/07/2013 10:48, Wim Niemans ha scritto:
I see that you probably hit the non-recursive nature of command.com and 
derivates.
In order to execute a command thru the command parser, you probably needs to 
code a CALL.

I remember such oddities from acuCobol.
In any case the "start" did not work for me.

Wim


Op 11 jul. 2013, om 10:04 heeft studiok het volgende geschreven:

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]