.ksh is the extension for Korn Shell scripts. If the file is a SAS program then ideally change the suffix to .sas as .ksh is just wrong.
....but shouldn't be an issue to run a SAS program stored in a file with the wrong suffix.
HOW do you plan to run this program? An %include statement to it, in batch via your own script, or in batch using a scheduler ....(which could cause some issues if using a SAS OEM version of lsf which doesn't allow for scheduling files other than .sas).
Hello,
Thanks for the response. I have several csv files that I need to combine them and put in a folder. I wonder if KSH extension can do that.
in one of them I have:
./01_split.ksh
./02_split.ksh
./03_add_somthing.ksh
./04_abc_combine.ksh
./04_def_combine.ksh
Regards,
blue blue
@GN0001 wrote:
Hello,
Thanks for the response. I have several csv files that I need to combine them and put in a folder. I wonder if KSH extension can do that.
in one of them I have:
./01_split.ksh
./02_split.ksh
./03_add_somthing.ksh
./04_abc_combine.ksh
./04_def_combine.ksh
Regards,
blue blue
The name and extension of the files is less important than it's content. You need to share what's IN these files for us to give you more guidance.
And yes, there are Unix/Korn Shell commands that allow to manipulate files.
I agree with what @Patrick has said.
The very fact that Korn shell scripts are in use indicates that they have been around for quite some time. Seniors who have been around in the organization should be able to assist.,
You have said that you want combine csv file and move them to a folder. Going by your posts in this thread, I suggest consider using SAS.
From where do you know it's a SAS program? Did you read it to verify it contains SAS code?
KSH extension is sometimes used to indicate that the file contains korn shell commands.
But both SAS programs and Korn Shell programs are just text files. So look at the file and see whether it has SAS code or Unix commands. (or perhaps it has both).
If you don't know how to open the file with a text editor you can just have SAS read the file and dump the contents to the SAS log.
data _null_;
infile 'myfile.ksh' ;
input;
list;
run;
Hi @GN0001
Did you look at the file content? - It might be a korn script that executes a SAS program. If this is the case, the script contains a command to start SAS with the program path/name as one of the arguments. This gives you 3 possible ways of executing the SAS program:
In many organizations with SAS installed in UNIX/Linux environment , Korn shell scripts are used to call SAS programs.
These scripts may are typically executed by some sort of scheduler. It is quite possible that this may be the case.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.