Using SCL with Other SAS Software Products |
Default Processing of Submit Blocks illustrates how submit blocks are processed when they are executed (not when they are compiled). Submit blocks are not processed when you test a SAS/AF application with the TESTAF command.
Default Processing of Submit Blocks
All of the code between a SUBMIT statement and the next ENDSUBMIT statement is copied into a special storage area called the preview buffer. The submitted code is not checked for errors when it is copied to the preview buffer. Errors in the submitted code are not detected until the statements or commands are executed.
The text in the preview buffer is scanned, and any requested substitutions are made. Substitution is discussed in Substituting Text in Submit Blocks in SCL Programs.
The contents of the preview buffer are submitted to SAS software for execution. You can specify options to change where and when the contents of the preview buffer are submitted and to specify the actions that the SCL program takes after the statements are submitted. See Modifying the Behavior of Submit Blocks in SCL Programs for details.
Note: By default, code is not submitted immediately when the submit block is encountered in an executing program. Also, when a nested entry (that is, an entry that is called by another entry in the application) contains a submit block, the submitted code is not executed until the calling task ends, or until another submit block with a CONTINUE or IMMEDIATE option is encountered. Simply ending the entry that contains the submit block does not process submitted code.
Note: Issuing the DM command inside of a SUBMIT block may cause the submitted statements to be executed in an unexpected order. You may want to use the CALL EXECCMD or EXECCMDI routine instead to issue your command.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.