Date: Tue, 27 Oct 1998 11:21:31 -0800
Reply-To: "Lanning, Chris" <clanning@AMGEN.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Lanning, Chris" <clanning@AMGEN.COM>
Subject: Help with system commands!!!
Content-Type: text/plain
Hello All,
I have a little problem. I submitted the following code on my PC running
Win95 and SAS 6.12:
%window transprt
#15 @4 "Enter the drive letter of the CDROM: " @45 cdrom 3
attr=underline
#17 @4 "Enter the path where the data should be copied: "
path 25 attr=underline required=yes
#19 @10 "Create the directory entered above (Y/N)? "
diryn 1 attr=underline
#21 @10 "Create subdirectories for format library and raw data
(Y/N)? "
subdiryn 1 attr=underline
#30 @15 "Press" @21 "ENTER" attr=underline @27 "to continue.";
%macro tran;
%let cdrom = d:;
%let diryn = Y;
%let subdiryn = Y;
%let path = c:\;
%display transprt;
%if %upcase(&diryn) = Y %then %do;
x "md &path";
%end;
%if %upcase(&subdiryn)= Y %then %do;
%sysexec md &path\formats;
%sysexec md &path\rawfiles;
%sysexec copy &cdrom\format.sas &path\formats;
%end;
%mend tran;
%tran;
The display worked perfectly. In the display I kept diryn and subdiryn
equal to Y so that the 'if' statements in the macro are true. When SAS
executed the system commands it did not close down the system window box
after executing the copy command. Then when I manually closed the box SAS
reopened it. It's like it was stuck in a do loop or something. Basically I
could not get it to leave the system commands box without totally shutting
down SAS.
What is going on here? How do I fix this crazy problem?
Thanks in advance!
Chris
Chris Lanning
Trilogy Consultant
clanning@amgen.com
1-805-447-0634
SAS Consulting is my life!!!