LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (December 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 4 Dec 2003 14:45:49 -0500
Reply-To:     Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject:      Re: Append (Newbie)
Comments: To: Microstructure <randistan69@HOTMAIL.COM>
Content-Type: text/plain

Micro,

In

set abc.master abc.file1 ... ;

the variable attributes (length type format label etc.) are obtained from the first dataset. If you want to override these attributes you need an ATTRIB statement BEFORE the SET statement. When length is the only attribute of interest you can use a LENGTH statement instead.

The code

proc sql ; select memname , name , length , type /* maybe more */ from dictionary.columns where libname = "ABC" and memname = MASTER or memname like "FILE" order by name , memname ; quit ;

may be very helpful in determining which variables require setting the length before the the SET statement.

IanWhitlock@westat.com

-----Original Message----- From: Microstructure [mailto:randistan69@HOTMAIL.COM] Sent: Wednesday, December 03, 2003 6:16 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Append (Newbie)

Dear All

I have 10 files that I want to append. All of the files have the same variables.

This is the code that I wrote. I just am using a set statement. Is there a better way?

libname abc 'C:/Test/Append';

data abc.append_500; set abc.master abc.file1 abc.file2 abc.file3 abc.file4

.......; run;

Also; data in one of the variables (Var1) has different column widths. For example the first entry has a width of 8 characters and the second entry has a width of 40 characters and so on. How can i set column width so that it captures all of the entries? The maximum width of an entry is 45 characters.

Also; can I use the informat command to set a variable as character or numeric?

Thanx in advance.


Back to: Top of message | Previous page | Main SAS-L page