Date: Thu, 20 Apr 2006 06:12:14 -0400
Reply-To: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Subject: Re: Can we use embedded data step
Hi Arun,
EXTENDED ANSWER
I don't agree entirely with that. If the CALL EXECUTE statement only causes
macro code to run, it will run immediately. Newly assigned macro variable's
values, however, are not available to the current data step, except via
SYMGET. But if the CALL EXECUTE statement (also via macro code) causes SAS
code to run, running that SAS code is delayed until __after__ the current
data step. So it should be a complete data step for example, with both a
DATA and a RUN statement. Any proc or data step generated this way may be
generated by multiple CALL EXECUTE statements, each generating partial SAS
code.
This is not really nesting, though it might (seem to) function like that.
Why would one need really nested (but not existing) data steps? I think in
many cases such a need might also be provided by a well designed single
data step.
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
On Thu, 20 Apr 2006 09:51:10 +0100, Arun Kumar 3
<Arun.Kumar3@ERICSSONSERVICES.CO.UK> wrote:
>Hi Rajesh,
>
>Use of routine Call Execute(arg) should do the job. Here the arg can be
>data step statement. When used in the data step, the argument resolves
>to a macro invocation. The main data step pauses and the macro executes
>immediately...
>
>
>Regards
>Arun
>
>-----Original Message-----
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>Rajesh
>Sent: 20 April 2006 08:49
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: Can we use embedded data step
>
>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.
>
>This communication is confidential and intended solely for the addressee
(s). Any unauthorized review, use, disclosure or distribution is
prohibited. If you believe this message has been sent to you in error,
please notify the sender by replying to this transmission and delete the
message without disclosing it. Thank you.
>
>E-mail including attachments is susceptible to data corruption,
interruption, unauthorized amendment, tampering and viruses, and we only
send and receive e-mails on the basis that we are not liable for any such
corruption, interception, amendment, tampering or viruses or any
consequences thereof.
>
>
>______________________________________________________________________
>This email has been scanned by the MessageLabs Email Security System.
>For more information please visit http://www.messagelabs.com/email
>______________________________________________________________________
|