Have a Question?
< All Topics

SCALL examples for VPRO/5 and BBj


Q.  I am on Windows 7 and I am having trouble figuring out how to execute a batch file from my VPRO/5 application with SCALL(), can you give me some examples?


A. You need to pass the Windows command prompt with a few parameters for this to work.

x=scall("cmd /c start C:/workarea/test.bat")

Note: the cmd /c start is needed by the OS


When running BBj one needs to consider the client / server aspect of where that SCALL() is going to take place.


If you running BBjServices as a service under Windows, you will never see the program running, because the SYSTEM user has no permissions to display to the screen.


If the client and server are two different machines:

scall will show the program on the server and the client will never see it.

BBj also offers the clientExec() method of executing a command on the client.  The clientExec() will fail if the program does not reside on the client.

BBj offers a SETOPTS byte/bit setting for running client side:


8 $08$

In BBj 4.0 and higher, ENV(), INFO(4,*), and SCALL (except SCALL(“bbj”)) refer to the CLIENT.  

In BBj 12.0 and higher, TIM, JUL(0,0,0), and DATE(0,…) use the client-side date and time when this bit is set.


When using SCALL() to access OS level commands or executables you may need to provide full path to the executable.



Created – 01/25/2017 Edited – 01/25/2017



Table of Contents
Scroll to Top