Hello ,
I am try to exceute the sas programs in a dircroty by %inc statement.
Requirement : 1) In a dirctory sas program will be genrated based on user input (we don't know number of proagrams and praograsm name )
2) Once user genrated sas programs , then exceute those progrms one by one in sas pogram file.
3) once the all prograsm exceuted then exit the current program.
Thank you,
Rajasekhar Reddy
Without knowing the names and the order in which the programs have to be executed, your task can't be solved.
Don't do this in SAS, use a shell script:
for PROGRAM in ${PROGPATH}/*.sas do sas $PROGRAM done
Add additional options (autoexec, config, log, output location) to the SAS call.
Running unknown programs in a single SAS instance is dangerous, as one program might change settings (options, libnames, file references, macro variables) and cause unwanted effects in the following codes.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: