Chapter Contents

Previous

Next
SAS Companion for the CMS Environment

Issuing CMS and CP Commands during a SAS Session

The ability to issue one or more CMS or CP commands during a SAS session or program can be very useful. For example, suppose you are using SAS in interactive line mode, and you want to access a file on another user's minidisk. In that case you would want to issue the necessary LINK and ACCESS commands without leaving your SAS session.

Ways of Issuing CMS or CP Commands during a SAS Session lists several ways of issuing CMS and CP commands from within a SAS session or program and tells you where to look for more information. The Notes column indicates whether you can use the method to issue only a single CMS or CP command, or whether you can also use the method to enter CMS subset mode. (From CMS subset mode, you can enter multiple CMS or CP commands.)

Ways of Issuing CMS or CP Commands during a SAS Session
SAS Language Element See... Notes
X or CMS statement CMS statement
Single command or subset mode.
X or CMS command CMS command
Single command or subset mode.
SYSTEM or CMS function CMS function
Single command. Returns the return code that was set by the execution of the command.
%CMS or %SYSEXEC macro statement Macro Statements
Single command.

When you issue commands in this manner, the responses from CMS or CP are routed to the console, not to the SAS log or to a procedure output file. In the windowing environment, the display is temporarily cleared, and the response appears on an otherwise blank screen. To return to the windowing environment, press either the CLEAR key or the PA2 key.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.