Easy to Create, Easy to Change - Easy to use!


call program





call program


Control Command


The call program command runs the specified DOS program.




The call program command is used to call and run another program at any point during a Control Procedure.

The called program can be any .BAT, .PIF (shortcut), .COM, or .EXE program. The command must specify the drive and directory on which the called program is stored if it is not stored in the current directory.

The command can include optional arguments. The command can be a constant (Example 1) or an expression involving functions and variables (Example 2). The program name and arguments must be enclosed in quotation marks unless specified as a variable.

When the called program has been executed, DataEase resumes processing the Control Procedure with the action following the call program command.

Example 1

 run procedure "MONTHLY RESERVATIONS" .

 call program "C: \LOTUS\123W.EXE RESVDATA.WK3" .


This script tells DataEase: (1) Run the predefined MONTHLY SALES Procedure which saves a summary of the monthly reservations to a disk file, and (2) call the Lotus 1-2-3 program and load the file created by the previous procedure for further processing.

Example 2

 define temp "CHART" TEXT .

 assign temp CHART := "RESVDATA.WK3" .

 define temp "PROG" TEXT .

 assign temp PROG := "C: \LOTUS\123W.EXE" .


 run procedure "MONTHLY SALES" .

 call program jointext ( temp PROG,temp CHART ) .


This script does exactly the same thing as the simpler one above, but shows the proper use of an expression as an argument for the call program command.

The call program command requires a space between the program name and any optional argument. Because the jointext function does not automatically insert a space between the PROG and CHART variables in the example above, a blank space is included inside the quotation marksafter the program name, 123W.EXE, stored in the PROG variable.


Note: The arguments of the jointext function (PROG, CHART) are not enclosed in quotes because they are variables.

See Also

On the forum about call program

On the blog about call program