LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 20 Apr 2006 09:09:27 GMT
Reply-To:     Eric Eyre <eeyre@CONCENTRIC.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Eric Eyre <eeyre@CONCENTRIC.NET>
Organization: Road Runner High Speed Online http://www.rr.com
Subject:      Re: Can we use embedded data step
Comments: To: sas-l@uga.edu

it seems as if a lot of SAS-Lers are heavily into embedding, but the variety I see here is embedding SET or INFILE/INPUT statements within DO loops as in

data answer; if _n_=1 then do until (lastobs); set monthsum end=lastobs; totalrev+revcargo; end; set monthsum; pctrev=revcargo/totalrev;

OR

data quarter; monthnum=month(today()); midmon=month(intnx('month',today(),-1)); lastmon=month(intnx('month',today(),-2)); do i = monthnum, midmon, lastmon; nextfile="c:\sasuser\month"!!compress(put(i,2.)!!".dat",' '); do until (lastobs); infile temp filevar=nextfile end=lastobs; input Flight $ Origin $ Dest $ Date : date9. output; end; end; stop;

"Rajesh" <Rajesh.vishwanath@gmail.com> wrote in message news:1145519350.081452.96350@g10g2000cwb.googlegroups.com... > Hi all, > > > Just i was thinking ,can we use embedded datastep in SAS. > That is within a datastep can we use another datastep.(i don't so it is > there). > But if is there can you let me know it would be a help for me. > > Thanks, > Rajesh. >


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