Previous Page | Next Page

Language Reference

QUEUE Call

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

The QUEUE subroutine places character arguments that contains 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 string queued is read after other lines of input already on 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 put in a hold state. This is usually induced by one of the following:

  • an execution error within a module

  • an interrupt

  • a pause command.

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, consult 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);

These statements produce the following result:

                          X

                          0
Previous Page | Next Page | Top of Page