Skip to Content
avatar image
Former Member

Run commend is now working in Power builder.

Hi All,

I have created abc.bat file which is running my ORCA script. abc.bat file I'm trying to execute through PB RUN function it's working fine. In the same way I have other one extract.bat file it's not working when I was executing through PB RUN commend. PB RUN commend is returning 1 in both case.

There are not syntax error in both bat files because of both are working when I try to run from commend prompt.

abc.bat file:

CD\

CD C:\Test folder

ORCASCR125.EXE CCNXDST.DAT

extract.bat:

"C:\Program Files\7-Zip\7z.exe" x "c:\test folder\myzip.7z" -o"C:\test folder" -y

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jul 19, 2017 at 07:11 PM

    The return code from the Run function only indicates that it was able to start the external program, in this case the DOS session that runs the command file. The Run function returns immediately and the next line of code is executed, it doesn't wait for the external program to finish.

    I have a code example of RunAndWait which also can give you a return code from the external program.

    http://www.topwizprogramming.com/freecode_runandwait.html

    Add comment
    10|10000 characters needed characters exceeded