Issues a CMS command, a CP command, or a REXX exec during a SAS
session
| Alias: |
X
|
| Valid: |
anywhere
|
| CMS specifics: |
all
|
-
command
-
specifies the command issued to the operating
environment. You can issue most CMS commands, CP commands, and REXX execs
with the CMS statement. CP commands can be preceded by CP, but this is not
required.
The CMS statement is similar to the CMS (or X) command,
the CMS (or SYSTEM) function, and the %CMS (or %SYSEXEC) macro statement.
Under CMS, CMS is an alias for the X statement. Under
other operating environments, the CMS statement has no effect, whereas the
X statement is always processed.
SAS executes the CMS statement immediately. A CMS statement
can appear within a DATA or PROC step, or between steps. CMS statements within
a step are scanned with that step and are executed before the step. CMS statements
that occur between steps (that is, after a RUN statement but before the next
DATA or PROC statement) are scanned and executed before the next step.
You can use the CMS statement to issue any CMS and CP
command, as long as the command does not destroy your working environment.
For example, you cannot issue a FORMAT command for the minidisk that contains
your current SAS WORK library or an IPL command. You can use the CMS EXEC
command to invoke an EXEC, as long as the EXEC does not include commands that
will destroy your working environment.
You can also use the CMS statement to go into CMS subset
mode during a SAS session. To enter CMS subset mode, place the CMS statement
in your program without specifying a system command. (In a windowing environment
session, enter CMS subset mode by issuing CMS as a command-line command. See CMS.)
After the
statement is executed, you can enter CMS and
CP commands as if you were in the subset mode of the CMS editor. In CMS subset
mode, you are not prompted with a line number as you would expect during a
SAS session. (The CMS subset prompt differs from installation to installation.)
Any commands that you enter in CMS subset mode are processed
by CMS or CP; they are not processed as SAS statements. They can be any length.
If you enter CMS subset mode in the middle of a DATA
or PROC step, any CMS or CP commands that you enter from your terminal are
executed before the rest of the step is scanned.
To return to the SAS session, issue the CMS subset command
RETURN. When you return to your SAS session from CMS subset mode, the numbering
of SAS statements resumes where it left off.
Note:
Because the CMS subset mode expects input from a terminal, it should not be
used in the batch environment.
You can issue any CP command that does not destroy your
working environment in CMS subset mode. For example, the DEFINE STORAGE, FORMAT,
and IPL commands cannot be used; but the LINK, SPOOL, and TAG commands can
be used.
The CMS commands that can be used in subset mode are
limited to the commands that do not use the user area of memory. If you enter
a command that is not allowed in subset mode, a message indicates that it
is an invalid subset command. See the VM/ESA CMS User's Guide
for a list of commands that cannot be issued from subset
mode.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.