I imported a text file and had been working on it and wanted to save. i.e permanently save under different library not work folder in sas Library
How can I save this. Below is the program. I want to save it as cholesterol2
Any help pleas
/*******************************************************
program cr_cholesterol1
purpose to format dates
creates dataset cholesterol
date amended
written
**********************************************************/
*location where
data is stored;
libname dcm_data 'F:\UQ\dcm\module 1';
data dcm_data.cholesterol;
infile'F:\UQ\dcm\module 1\cholesterol.prn'firstobs=2missover; *reading in raw data;
/*reading in alldata*/
input @6 id 3. @16 cholest 1. @20 gender $1. @30 systolic 3. @38 diastolic 3. @46 height 3. @54 weight 3. @64 ses 1. @73 don ddmmyy10./*date of birth*/ @89 date_assess ddmmyy10.;
*formating datevariables;
format dob ddmmyy10. date_assess date9.;
proccontents;
run;
Your is already saving the dataset. (I assume the missing spaces between in the program are the result of copying and pasting.)
Your program is creating a dataset named cholesterol, you could just change the name in the DATA statement if you want to save it as another name.
If you want to save some other dataset that you have created then you could just run another data step.
data dcm_data.cholesterol2 ;
set other_work_dataset ;
run;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.