cancel
Showing results for 
Search instead for 
Did you mean: 

Run commend is now working in Power builder.

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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

Answers (0)