Previous Page | Next Page

SAS Functions and CALL Routines under Windows

MCIPISLP Function: Windows

Causes SAS to wait for a piece of multimedia equipment to become active.
Category: Special
Windows specifics: all

See Also




specifies the number of seconds you want SAS to wait. This number must be an integer.


The MCIPISLP function is especially useful when you have used the MCIPISTR function to open a piece of equipment, but you know it is going to take a few seconds for the equipment to be ready.

The number-of-seconds argument must be an integer and represents how many seconds you want to wait. The return value is the number of seconds slept.

The MCIPISLP function can be used in the DATA step and in SCL code.


This example uses both the MCIPISTR and MCIPISLP functions to play a CD and a video. The PUT statements display the return values of these functions. This display allows you to see in the SAS log whether there was a problem with any of your equipment.

data _null_;
  /* Open a CD player. */
  msg=mcipistr("open cdaudio alias mytunes");
  put msg=;
  /* Wait one second for the CD player     */
  /* to become active.                     */
  /* Begin playing your favorite tunes     */
  /* from the beginning of the CD.         */
  msg=mcipistr("play mytunes");
  put msg=;
  /* Now open a video file. */
  msg=mcipistr("open c:\movies\amovie.avs
                alias myshow");
  put msg=;
  /* Begin the show and wait for it to     */
  /* complete.                             */
  msg=mcipistr("play myshow wait");
  put msg=;
  /* When the show is complete,            */
  /* close the instance.                   */
  msg=mcipistr("close myshow");
  put msg=;
  /* Stop and close the instance of the CD */
  /* player.                               */
  msg=mcipistr("stop mytunes");
  put msg=;
  msg=mcipistr("close mytunes");
  put msg=;

See Also

Previous Page | Next Page | Top of Page