09-20-2013 08:41 PM
Sure would appreciate if any of you experts could provide me an efficient way of calling, from an ongoing SAS code some of the SAS code residing in some other file.
Suppose a simple SAS program like the following in a file F:\Temp\Test.sas:
PROC TABULATE DATA=SASHELP.SHOES OUT=TEST;
CLASS REGION SUBSIDIARY PRODUCT;
VAR SALES INVENTORY;
TABLE REGION, REGION*SUBSIDIARY, PRODUCT*SALES PRODUCT*INVENTORY;
and another simple program like the one below in a file like D:\AnotherTemp\AnotherTest.sas:
CREATE TABLE ABC AS
SELECT COUNT(Name) FROM SASHELP.CLASS WHERE SEX='M';
Now how to call these two programs from the current program file as:
msg='Some Code 1!'; run;
<<SOME WAY TO GENERATE THE OUTPUT USING THE FILE F:\TEMP\TEST.sas>>
data hello; msg='Some Other Code 2!'; run;
<<SOME WAY TO GENERATE THE OUTPUT USING THE FILE F:\TEMP\D:\AnotherTemp\AnotherTest.sas>>
data bye; msg='Some Other Code 2!'; run;
Your helpful feedback shall be obliged.
Thanx in advance.
Need further help from the community? Please ask a new question.