I saw several videos on TH-cam and used Chat GPT to understand how to convert Excel to SAS. Nothing worked. Finally, after narrowing down my search when I found this video and followed each step, I was able to get it to work. Thank you very much! I have further questions on SAS since I am relatively new to it. Let me know if you can help. Thanks.
Glad it was helpful. We will be more that happy to support wherever we can.. feel free to post your doubts here, you can also send us the mail at learnerea.edu@gmail.com
Hi sir in proc import the path belongs to outside environment not to sas environment then why should you take it from sas environment?will you please explain indetail of my query?
when the file is in SAS environment, wouldn't that already be a SAS dataframe and you will be directly able to use. Would there be even a requirement of importing. Importing is generally used when you have the data outside of sas and in different formats Let me know if I can help you any further.
hi Sir, may i know 1. what happens if we dont give replace and the dataset out already exists, 2.why do we give semicolon at the end of dbms and also sheet ?
In SAS, the behavior when a dataset already exists depends on whether the REPLACE option is specified in the DATA or PROC step. Without REPLACE Option: If the dataset already exists and you don't specify the REPLACE option, SAS will generate an error, and the data step or procedure will not execute. SAS will issue a warning similar to "ERROR: File WORK.YOURDATASET already exists." With REPLACE Option: If you include the REPLACE option, SAS will replace the existing dataset with the new one. Be cautious when using the REPLACE option, as it can lead to unintentional data loss if you overwrite an existing dataset. n SAS, the semicolon ; is used to signify the end of a statement. In the context of reading data from external files like Excel, the DBMS and SHEET options are part of the PROC IMPORT statement. The semicolon is used to terminate the PROC IMPORT The semicolon is a fundamental part of SAS syntax and is used to separate statements and indicate the end of a step or procedure. It tells SAS that the current statement is complete and it should execute the preceding statements. Without the semicolon, SAS would treat subsequent statements as part of the same logical statement, potentially leading to syntax errors.
Sure, will try and make something similar soon. In the meantime, I recommend you to check out this video which will give idea how to do this - th-cam.com/video/IV-iTcuZ12g/w-d-xo.html
Hi Govind, Thanks for watching this. Now SAS University edition is not supported anymore, alternatively they have started SAS OnDemand, which is cloud based. You can use the below link to understand how to start with SAS OnDemand th-cam.com/video/IV-iTcuZ12g/w-d-xo.html
I saw several videos on TH-cam and used Chat GPT to understand how to convert Excel to SAS. Nothing worked. Finally, after narrowing down my search when I found this video and followed each step, I was able to get it to work. Thank you very much! I have further questions on SAS since I am relatively new to it. Let me know if you can help. Thanks.
Glad it was helpful. We will be more that happy to support wherever we can.. feel free to post your doubts here, you can also send us the mail at learnerea.edu@gmail.com
Thank you my friend. Simple, short, and perfect tutorial.
Thank you for watching
sir,.can u tell me how u save the excel files in SAS studio ??
Can you share data files which is used in this all station.
Hi sir in proc import the path belongs to outside environment not to sas environment then why should you take it from sas environment?will you please explain indetail of my query?
when the file is in SAS environment, wouldn't that already be a SAS dataframe and you will be directly able to use. Would there be even a requirement of importing.
Importing is generally used when you have the data outside of sas and in different formats
Let me know if I can help you any further.
hi Sir, may i know 1. what happens if we dont give replace and the dataset out already exists, 2.why do we give semicolon at the end of dbms and also sheet ?
In SAS, the behavior when a dataset already exists depends on whether the REPLACE option is specified in the DATA or PROC step.
Without REPLACE Option:
If the dataset already exists and you don't specify the REPLACE option, SAS will generate an error, and the data step or procedure will not execute. SAS will issue a warning similar to "ERROR: File WORK.YOURDATASET already exists."
With REPLACE Option:
If you include the REPLACE option, SAS will replace the existing dataset with the new one. Be cautious when using the REPLACE option, as it can lead to unintentional data loss if you overwrite an existing dataset.
n SAS, the semicolon ; is used to signify the end of a statement. In the context of reading data from external files like Excel, the DBMS and SHEET options are part of the PROC IMPORT statement. The semicolon is used to terminate the PROC IMPORT
The semicolon is a fundamental part of SAS syntax and is used to separate statements and indicate the end of a step or procedure. It tells SAS that the current statement is complete and it should execute the preceding statements. Without the semicolon, SAS would treat subsequent statements as part of the same logical statement, potentially leading to syntax errors.
Hello Sir, how to convert multiple xpt files into sas dataset using macro??????????????
%macro import_xpt_files(dir, outdsn);
%local filrf file;
%let filrf=&dir/*.xpt;
%do file=%sysfunc(dopen(&filrf));
%let filename=%sysfunc(dread(file));
%put &=filename;
proc copy in=xport out=&outdsn;
select &filename;
run;
%end;
%let rc=%sysfunc(dclose(file));
%mend import_xpt_files;
/* Use the macro to import the XPT files in the "data" directory */
%import_xpt_files(dir='data', outdsn=work);
Can You share how to Export using SAS on Demand? Thank You
Sure, will try and make something similar soon. In the meantime, I recommend you to check out this video which will give idea how to do this -
th-cam.com/video/IV-iTcuZ12g/w-d-xo.html
Thank you sir.
Most welcome
how to upload the file in SAS studio
Hi Govind, Thanks for watching this. Now SAS University edition is not supported anymore, alternatively they have started SAS OnDemand, which is cloud based. You can use the below link to understand how to start with SAS OnDemand
th-cam.com/video/IV-iTcuZ12g/w-d-xo.html
Tnk u 😊
where are the data files to download?
Hot able to locate where I should save excel file
Getting error physical file does not exist
It is ok but what if we have multiple columns with date in out csv file.
what's the error you are getting in that case