08-21-2014 05:24 AM
I'm trying to execute some SAS code, as a response to pressing of a button in a frame. I've put the code in a 'submit continue' block, like it was said in another place on the forum. Yet, the code seems to be totally ignored... what am I doing wrong here?
Here's what i have as the event handler block. Anu code i put outside of submit block works just fine, like the label part.
proc print data=sashelp.class;
|runButton.label = 'pressed';|
08-21-2014 07:15 AM
You are doing nothing wrong, it is normal behavior of using scl.
08-21-2014 07:59 AM
But from the description of Continue option, I got the impression that the submit block should be executed immediately, and the rest of the program should be suspended until the block is done. This is clearly not happening here...
suspends program execution while the submit block executes and then continues program execution at the statement that immediately follows the ENDSUBMIT statement.
08-21-2014 08:40 AM
Id did give the link how the preview-buffer is used and the note I copied is in the bottom.
The description of scl continue statement is not clear. It can be read as:
- the scl execution (your af program) is suspended while doing the submit block.
- after placing all things in the proview buffer scl(af) will proceed his processing.
SUBMIT labels the beginning of a block of SAS statements or commands to submit to SAS software. When SUBMIT is encountered, SCL collects all the text between SUBMIT and ENDSUBMIT and places it in the PREVIEW buffer. Based on the value of the when option, SCL submits the statements to SAS for execution at the appropriate time.
The where and host options are valid only if the when option is specified. Regardless of the value of the where option, all submit block text can be buffered in the PREVIEW window. You need to make certain that the CONTINUE option is specified when you want the statements to be submitted.
By default, when control returns to SCL, the program continues to execute the statements that follow ENDSUBMIT.
See the example on the preview buffer, it is submitted not processed by the sas language processor and cleared whit a cancel action