
You can define a DQL routine and then call it by name elsewhere in the same DQL.
For example, look at the following section of DQL.
define "Res" Number .
define "Arg" Number.assign Arg := 10 .
/* This procedure takes a number and returns its square */procedure Number SqByVal(Number x)return x*x .end.
In the section of code above we have done two things.
Firstly we have defined two variables, and assigned one of them (Arg) a value of 10.
Secondly we have written a section of DQL which reads;
/* This procedure takes a number and returns its square */procedure Number SqByVal(Number x)return x*x .
 this code has defined a procedure named SqByVal. The procedure takes one parameter, a number, multiplies the parameter by itself, and then returns it.
Using the new call routine by keyword facility we can use this procedure anywhere in our DQL script. For example, the following line of code;
assign Res := SqByVal(Arg) .
 calls the procedure, and passes it the variable Arg, which currently has a value of ten. The procedure multiplies Arg by itself, and returns the result into Res. If we now write a line of DQL such as;
message Res window .
 the value 100 will appear in a message window  just to prove that the procedure really works.
If you have DQL procedures which use the same routine many times, then you will appreciate how useful the new facility will be in creating shorter and more easily maintained DQLÂs.
Product: DataEase for Windows 7.x. Written by George Washington 11/04/14 at 08:26:17
Product: DataEase 8 Reporter. Written by eduardo paez 02/05/14 at 14:40:11
Product: . Written by Marco Marchesi 15/02/16 at 14:50:46
Product: . Written by Grossi Gioacchino 18/11/19 at 14:33:44
Product: Dataease [{8}]FIVE. Written by Rainer 22/03/21 at 11:13:10
Product: Dataease [{8}]FIVE. Written by Rainer 08/06/21 at 14:12:40