Controlling the Execution of SCL Programs

A great deal of control is possible using simple conditional statements. To control application execution in an SCL program, use an IF/THEN conditional statement and a DO group. For example, the following code uses an IF/THEN conditional statement with a DO group to clear values that are entered on a frame when the clearValuesButton is clicked (but only if the frameProtected variable is set to No):
clearValuesButton:
   if frameProtected = 'No'
      then 
        do;
           textEntryName.text = ”;
           textEntrySalary.text = .;
           textEntry.text = ”;
        end;
       return;
   /* ...SCL statements... */
return;
For additional information about controlling application flow (the DO WHILE, DO UNTIL, GO TO, and the SELECT and WHEN statements), see the SAS Component Language: Reference.