Date: Thu, 20 Apr 2006 06:02:27 -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
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. 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
Regards - Jim.
Jim Groeneveld, Netherlands
Statistician, SAS consultant
On Thu, 20 Apr 2006 09:51:10 +0100, Arun Kumar 3
>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
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>Sent: 20 April 2006 08:49
>Subject: Can we use embedded data step
>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
>But if is there can you let me know it would be a help for me.
>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
>This email has been scanned by the MessageLabs Email Security System.
>For more information please visit http://www.messagelabs.com/email