The SAS Output Delivery System and reporting techniques

saving files and

Reply
Occasional Contributor
Posts: 8

saving files and

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;

Super User
Super User
Posts: 6,842

Re: saving files and

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;

Ask a Question
Discussion stats
  • 1 reply
  • 205 views
  • 1 like
  • 2 in conversation