BookmarkSubscribeRSS Feed
Talwinder
Calcite | Level 5

Hi Team,

Can anyone tell me how to save data of proc append. Like i have below mentioned data 

data app;

input amt name $ age;

cards;

1000 abc 21

2000 def 22

3000 ghi 23

4000 jkl 24

;

run;

data app1;

input name $ age bonus;

cards;

jkl 24 1000

mno 25 2000

;

run;

 

then i run proc appned function like below.

 

proc append base=app data=app1 force;

run; proc print; run;

 

i want to save the output in my library or in work library. Its not for proc append only. if i have querires of proc tabulate then how can i save the data for these procedures.

2 REPLIES 2
Reeza
Super User

The data is in the BASE table. If you want it in a library, assign it to a library or use PROC COPY/DATASETS to move it. 

 

Proc datasets lib=work;

copy in=work out=myLib;

select app;

Run;quit;

 

 

kaverisonu1
Fluorite | Level 6

Proc append always saves the output(base dataset) in either work library or if you have used any library reference then it will save the append output. Do you want it to be save it separately which really amkes little sense,you can use copy the dataset using

proc dataset.

 

Also use can use ods statements to save the output of sas procedures in a dataset.

 

http://www2.sas.com/proceedings/forum2008/086-2008.pdf

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 4649 views
  • 0 likes
  • 3 in conversation