This is my code:-
/**Assign a libname for excel sheet*/
libname inexcel xlsx '/home/viadmin/casuser/mapping.xlsx';
PROC CONTENTS DATA=inexcel._ALL_ noprint
OUT=Sheets (KEEP=Memname);
RUN;
PROC SORT DATA=Sheets NODUPLICATES;
BY Memname;
RUN;
DATA Sheets;
SET Sheets;
ID=_N_;
RUN;
DATA _NULL_;
IF 0 THEN SET Sheets NOBS=X;
CALL SYMPUT('Recount', X);
STOP;
RUN;
%macro Excel;
%DO i = 1 %TO &Recount;
PROC SQL ;
create table sheet&i. as
SELECT Memname INTO :Name
FROM Sheets WHERE ID = &i;
quit;
%end;
%mend;
%excel;
from this i got sheet names- Sheet1,sheet2,
now i want to generate .sas file for this so that It will be job for sheet.
like- Job_sheet1.sas , Job_sheet2.sas
... View more