Date: Wed, 28 Jun 2000 01:08:27 -0400
Reply-To: Richard DeVenezia <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Richard DeVenezia <radevenz@IX.NETCOM.COM>
Organization: MindSpring Enterprises
Subject: Re: Manipulating Data Sets From Within a Frame/SCL program...
Kenny:
In SCL submit blocks &<var> first tries to replace with a same named SCL
variable's value. If there is no SCL variable <var>, then the macro system
kicks in and would try to replace &<var> with the value of the macro
variable <var>. If there is no macro variable named <var> you will get an
error in the log.
submit continue;
... &scl-variable-name ... ; %* &scl-variable-name will be replaced with
value of scl-variable-name ;
endsubmit;
There are many ways to read a data set depending on what you want to do with
it.
open
lvarlevel
close
will give you an SCL list containing unique values of a variable in a data
set
open
where
do while (0=fetch())
end
close
will read each row of a data set meeting a where criteria
use call set() to make SCL variables automatically update their values to
those of like named data set variables. Otherwise use getvarn() and
getvarc() to obtain values of variables in row fetched.
--
Richard DeVenezia
SAS Tips and Tools - http://pweb.netcom.com/~radevenz
"CyberDog" <cyberdog@dog.com> wrote in message
news:8jbha3$8en$1@nnrp1.deja.com...
> Hello,
> I am quite new at SAS programming. I am being required to
> learn it for my job right now. I've been programming in many other
> languages for 6 years. Does anyone have any good example on reading
> a data set from a scl program. Also does the submit command work with
> variables. For example if I wanted to submit a string which is made
> by the program depending on certain conditions. Sorry if I sound
> stupid. I've only been using SAS for 3 days now and am really being
> rushed to get a project done. Any help would be greatly appreciated.
>
> Kenny.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.