The following Embedded SQL example returns the degree equivalents corresponding to the radian values 0 through 6:
SET a=0
WHILE a<7 {
&sql(SELECT DEGREES(:a) INTO :b)
IF SQLCODE'=0 {
WRITE !,"Error code ",SQLCODE
QUIT }
ELSE {
WRITE !,"radians ",a," = degrees ",b
SET a=a+1 }
}