BookmarkSubscribeRSS Feed
andreas_lds
Jade | Level 19
This option is defined in the server-metadata and be altered by your sas-administrators only.
HamidK
Calcite | Level 5
Andreas,

Thank you for your response. However, I am have SAS and EG installed on my standalone computer. I found references to changing the settings re. XCMD in another thread:

http://support.sas.com/forums/thread.jspa?messageID=28370

I will figure out how to change my PC settings - I don't have admin rights to it!
HamidK
Calcite | Level 5
Oleg,

Thank you. This works. I will use it for now until I get the XCMD enabled on my SAS configuration.

Regards,
Hamid.
Oleg_L
Obsidian | Level 7
Greetings!

May be this version of macro will work on your default EG settings.
I can not test it in EG. I don't have it.

[pre]

%macro cfin(cfindir=d:\data\2011\sks\,out=work.plast);

%let filrf=mydir;
%let rc=%sysfunc(filename(filrf,"&cfindir"));
%let did=%sysfunc(dopen(&filrf));
%let lstname=;
%let memcount=%sysfunc(dnum(&did));
%if &memcount > 0 %then %do;
%do i=1 %to &memcount;
%let lstname=%sysfunc(dread(&did,&i));
%let file=&cfindir.&lstname;
PROC IMPORT DBMS=EXCEL2002 OUT= _&i
DATAFILE= "&file" REPLACE ;
RANGE='PRV_RATE$A1:F65536';
GETNAMES=YES;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
DBSASLABEL=NONE;
TEXTSIZE=100;
RUN;
proc append data=_&i base=&out; run;
proc delete data=_&i; run;
%end;
%let rc=%sysfunc(dclose(&did));
%end;
%mend cfin;

options mprint=1;
%cfin(cfindir=d:\data\2011\sks\,out=work.plast);


[/pre]
PaigeMiller
Diamond | Level 26

The %For macro has examples of importing multiple Excel spreadsheets, see the last example at

http://www.sascommunity.org/wiki/Streamlining_Data-Driven_SAS_With_The_%25FOR_Macro

--
Paige Miller

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 19 replies
  • 15861 views
  • 1 like
  • 10 in conversation