data _null_; answer='n'; if upcase(answer)='y' then do; x 'md c:\extra'; end; run;
C:\EXTRA
folder
is created regardless of whether the value of ANSWER is equal to 'n'
or 'y'
.
options noxwait; data _null_; input flag $ name $8.; if upcase(flag)='Y' then do; command='md c:\'||name; call system(command); end; datalines; Y mydir Y junk2 N mydir2 Y xyz ;
C:\MYDIR
, C:\JUNK2
,
and C:\XYZ
. The C:\MYDIR2
folder
is not created because the value of FLAG for that observation is not Y
.
The X command is active. Enter EXIT at the prompt in the X command window to reactivate this SAS session.
x notepad;
Options in Effect
|
Result
|
---|---|
XWAIT
XSYNC
|
The command prompt window waits for you to type EXIT before closing, and SAS waits
for the application
to finish.
|
XWAIT
NOXSYNC
|
The command prompt window waits for you to type EXIT before closing, and SAS does
not wait for the application
to finish.
|
NOXWAIT
XSYNC
|
The command prompt window closes automatically when the application finishes, and
SAS waits for the
application to finish.
|
NOXWAIT
NOXSYNC
|
The command prompt window closes automatically when the application finishes, and
SAS does not wait
for the application to finish.
|