Desktop productivity for business analysts and programmers

How to combine multiple programs into one single program?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 11
Accepted Solution

How to combine multiple programs into one single program?

Hi!

 

Is there a way to combine multiple program into one single program? I need to print the file for reference.

 

Thanks in advance.


Accepted Solutions
Solution
2 weeks ago
Frequent Contributor
Posts: 142

Re: How to combine multiple programs into one single program?

Posted in reply to Myurathan

Why do you want to export all 60 files and combine them, (first combine them and export the final data)how big is your each SAS program, if small files you always can include in one single sas program and you can append all data using proc append.

 

prg1 --data1

....prg60 --data60

 

you can always macrotize to make it simple if the programs are similar.

View solution in original post


All Replies
PROC Star
Posts: 1,190

Re: How to combine multiple programs into one single program?

Posted in reply to Myurathan

I'm not sure what you mean? Do you have multiple sas files that you want to store in a single file?

 

Remember, they are just text files. I'm sure there are tools out there that can combine several text files into one..

Occasional Contributor
Posts: 11

Re: How to combine multiple programs into one single program?

Thanks @draycut. I know. but I do not wanna individually export each file as txt and then combine. Because I have around 60 programs.
Solution
2 weeks ago
Frequent Contributor
Posts: 142

Re: How to combine multiple programs into one single program?

Posted in reply to Myurathan

Why do you want to export all 60 files and combine them, (first combine them and export the final data)how big is your each SAS program, if small files you always can include in one single sas program and you can append all data using proc append.

 

prg1 --data1

....prg60 --data60

 

you can always macrotize to make it simple if the programs are similar.

SAS Super FREQ
Posts: 377

Re: How to combine multiple programs into one single program?

Posted in reply to Myurathan

You might want to look into exporting all the code in your EG project (File->Export->Export All Code...), to see if that could meet your needs.  It will export all the programs (both embedded and externally referenced) in your project to a single .sas file.

 

If your programs are stored as .sas files (rather than embedded in EG projects), I'd suggest using an operating system command to concatenate them together.  For example, the cat command if using Linux (ex. cat 1.sas 2.sas 3.sas > combined.sas)

 

Casey

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 159 views
  • 0 likes
  • 4 in conversation