QUEUE Call

CALL QUEUE( argument1 <, argument2, ..., argument15> ) ;

The QUEUE subroutine places character arguments that contain valid SAS statements (usually SAS/IML statements or global statements) at the end of the input command stream. You can specify up to 15 arguments. Each argument to the QUEUE subroutine is a character matrix or quoted literal that contains valid SAS statements.

The queued string is read after other lines of input already in the queue. If you want to push the lines in front of other lines already in the queue, use the PUSH subroutine instead. Any statements queued to the input command queue get executed when the module is paused (see the PAUSE statement), which happens when one of the following occurs:

  • An execution error occurs within a module.

  • An interrupt is issued.

  • A PAUSE statement executes.

The strings you queue do not appear on the log.

Caution: Do not queue too many statements at one time. Queuing too many statements can cause problems that can result in exiting the SAS System.

For more examples, see Chapter 18.

An example that uses the QUEUE subroutine follows:

start mod(x);
   code="x=0;";
   call queue (code,"resume;");
   pause;
finish;

x=1;
run mod(x);
print x;

Figure 23.247 Result of Evaluating Queued Statements
x
0