BookmarkSubscribeRSS Feed
Nieumysl
Calcite | Level 5

Hi,

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.

RUNBUTTON:

        submit continue;

           proc print data=sashelp.class;

           run;

        endsubmit;

     

        runButton.label = 'pressed';

RETURN;

3 REPLIES 3
jakarman
Barite | Level 11

You are doing nothing wrong, it is normal behavior of using scl.

http://support.sas.com/documentation/cdl/en/sclref/67564/HTML/default/viewer.htm#p0zd8kh1xqn3zun1jy5...

Note: By default, code is not submitted               immediately when the submit block is encountered in an executing program.

---->-- ja karman --<-----
Nieumysl
Calcite | Level 5

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...

CONTINUE

suspends program execution while the submit block executes and then continues program execution at the statement that immediately follows the ENDSUBMIT statement.

jakarman
Barite | Level 11

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.

SAS(R) Component Language 9.4: Reference, Third Edition (submit scl)

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

SAS(R) Component Language 9.4: Reference, Third Edition

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 465 views
  • 0 likes
  • 2 in conversation