MCIPISTR Function: Windows

Submits an MCI string command to a piece of multimedia equipment.

Category: Special
Windows specifics: all


Required Argument


is any valid SAS string; a character variable, a character literal enclosed in quotation marks, or other character expression.


The MCIPISTR function submits an MCI (Media Control Interface) string command.
You can use MCI to control many types of multimedia equipment, such as CD players, mixers, videodisc players, and so on. Windows provides MCI support. For more information about valid MCI string commands, refer to the Windows multimedia SDK documentation in the MSDN Library and your MCI-compliant device documentation.
The return value is a string that contains return information from the MCI string command. Examples of return information include "invalid instance" and "1".
Note: Not all MCI commands supply return codes that are usable from SAS.
The MCIPISTR function can be used in the DATA step and in SCL code.


To use a CD player, you could submit the following statements in your DATA step:
msg=mcipistr("open cdaudio alias cd");
msg=mcipistr("play cd");
msg=mcipistr("stop cd");
msg=mcipistr("close cd");