Date: Mon, 11 May 2009 13:06:27 -0400
Reply-To: Nathaniel.Wooding@DOM.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: how to read trailer lines into SAS
In-Reply-To: <EmYNl.6920$Lr6.1261@flpi143.ffdc.sbc.com>
Content-Type: text/plain; charset="US-ASCII"
Here is still another way to do this:
data have ( drop = tot_sum )
trailer ( keep = tot_sum );
infile 'c:\park\trailer.txt' dlm='09'X missover end=last;
input ID $ quatity cost; ;
if not last then do;
output have;
end;
else do;
tot_sum = input( id , 8. );* this is necessary since ID is a
character variable and I assume that
* tot_sum should be numeric;
output trailer;
end;
run;
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.
|