Skip to Content
0

Run commend is now working in Power builder.

Jul 19, 2017 at 03:08 PM

76

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Roland Smith Jul 19, 2017 at 07:11 PM
1

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

Share
10 |10000 characters needed characters left characters exceeded