f



Re: SAS Sample 1728 Was ---> Re: SAS Sample 1727 #3

First, let me admit/acknowledge that I have no knowledge of the history of
this thread. Been tied up catching up post SAS Global Forum and post the
announcement of sasCommunity.org.

But I would like to offer some thoughts regarding Toby's comment:

> No as for the sascommunity.org, do we really want a macro library.  Well I
> would say yes and no.  I would like to have one and there are those who
> have
> paced some Macros on there already.  I believe Don and Ron both have,
> actually they were on there before the Wiki went public.  However, since
> people tend to get Macro crazy and delusional, I wouldnt want everyone to
> start dumping their macros on their.  Many times we see people who create
> macros where they shouldnt have created macros.   So I would caution
> against
> getting too happy with placing macros on the sascomunnity.org.  Dont get
> me
> wrong if it is a good macro well designed and well usefull hunk of code
> then
> by all means get it up tere and fast, however think about it before you do
> it please.

I share Toby's concerns regarding folks getting macro happy. And, like Toby,
don't get me wrong, I like macros and use them a lot. But far too many users
jump right into macro. So my concern WRT sasCommunity.org is that I am
hoping the users don't go macro happy and tag/categorize everything as a
macro instead of something about the specific issue being addressed.

As far as the pre-release example that I put out there
(http://www.sascommunity.org/wiki/Filelist_macro), as stated at the top of
the page, this is something that I created based on some different ideas
from SAS-L. The point of this example was to suggest that instead of
uploading .sas files containing macro code, that we consider using the
features of the wiki to embed the code in the page. That would enable
anybody to improve it and comment on it, while still keeping all the
history.

And, yes I know that the macro could perhaps do more error checking :-).
That is a tough issue because quite often the calling environment has
already done many checks and having each macro check each and every
assumption is a tough nut to crack.

Regards,
-don h
0
5/3/2007 2:20:44 PM
comp.soft-sys.sas 140428 articles. 1 followers. Post Follow

0 Replies
373 Views

Similar Articles

[PageSpeed] 48

Reply:

Similar Artilces:

Re: SAS Sample 1727
RFLMAO.... I saw this this morning and said 'WOW this code sucks big time!!!', just didnt have the heart to post how bad it sucked on the list. But good for you Chang....give'em hell my man....perhaps if we hammer on them enough they will improve their sample code. Toby Dunn You can see a lot by just looking. ~Yogi Berra Do not seek to follow in the footsteps of the wise. Seek what they sought. ~Matsuo Basho You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell From: Chang Chung <chang_y_chung@HOTMAIL.COM> Repl...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #3
Okay, I think I need to weigh-in on this. First, the exam is designed to test what you know about how SAS works. I think it does a fair job at that. (I say so partly because I only scored 89 on the exam. Now, I didn't prepare for the exam; I was really testing the exam when I took it as opposed to using the exam to test my skills.) The exam doesn't know how well you can program. There is a big difference between having a large vocabulary and knowing the rules of grammar and knowing how to write. Similarly, there's a big difference between knowing how SAS works and knowing how...

Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #3
Wow, that was a leap. Better not use Apache or PHP then. Andy >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On >Behalf Of ben.powell@CLA.CO.UK >Sent: Thursday, February 05, 2004 10:37 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) > >Sounds like R is the SAS equivalent of Linux .. who are >incidentally in all >sorts of a copy left/right mess at the moment. > >On Thu, 5 Feb 2004 09:39:37 -0500, Peter Flom <flom@NDRI.ORG> wrote: > >>I use both SAS a...

RE : Re: RE : Re: copulas and SAS
Thanks, I appreciate your comments,I understand that copula is not the appropriate tool to use, what will be the alternative ? Adel David L Cassell <davidlcassell@MSN.COM> a �crit : joewhitehurst@GMAIL.COM replied: > >Adel, > >You may find the following artilce interesting. [article by Thomas Mikosch not copied] This is a really good article, and a really useful point to make. But 55K is a lot of article to copy. Would it have been easier to point to a URL? The people who read SAS-L as a digest and the people who have slow connections are probably not overly thrilled...

Re: SAS Sample 1727 #4
thank you Chang. I whole-heartedly agree with your sentiments about the really poor quality -- both as written and as teaching examples -- of a lot of sas examples. We need more Shakespeare and less kindegarten-speak. Raise the bar! -- Ian Whitlock Ron Fehd the KaiZen! maven CDC Atlanta GA USA RJF2 at cdc dot gov > -----Original Message----- > From: Chang Chung > Don't take me wrong. I love having 17 hundred pieces of > working code to read and learn from. It is just that some of > the code posted at > http://support.sas.com/ctx/samples/index.jsp are just not >...

Re: SAS Sample 1727 #8
%Macro Label( DataIn = ) ; %Local DSID GetValue GetVarName Close I ; %Let DSID = %Sysfunc( Open ( &DataIn , IS ) ) ; %Do I = 1 %To %Sysfunc( Attrn( &Dsid , NVars ) ) ; %Let GetVarName = %Sysfunc( Varname( &DSID , &I ) ) ; %Let GetValue = %Sysfunc( GetVarC( &DSID , &I ) ) ; &GetVarName = "&GetValue" %End ; %Let Close = %Sysfunc( Close( &DSID ) ) ; %Mend Label ; Data One ; Infile DataLines DSD ; Input Var1 :$11. Var2 :$11. Var3 :$11. Var4 :$11. ; DataLines ; Label One,Label Two,Label Three ; Run ; Data TwoB ; Input Var1 :$11. Var2...

Re: SAS Sample 1727 #7
On Tue, 1 May 2007 15:13:09 -0400, data _null_; <datanull@GMAIL.COM> wrote: >Perhaps some of this is "a matter of taste". I was not offended by >the infile/input statements as much by needless use of macro. Seems >to me like one could get by with a %LET executed by CALL EXECUTE. > >%global labels; >%let labels=; >data _null_; > infile datalines dsd; > array _v[*] $11. var1-var3; > input _v[*]; > do _n_ = 1 to dim(_v); > call execute(catx(' ', > '%let labels=&labels', > vname(_v[_n_]), &g...

Re: SAS Sample 1727 #13
Will these two modification fix the problems you are describing? %Let GetValue = %qSysFunc( GetVarC( &DSID , &GetVarNum ) ) ; &GetVarName = %sysfunc(quote(%SuperQ(GetValue))) On 5/2/07, Chang Chung <chang_y_chung@hotmail.com> wrote: > On Tue, 1 May 2007 23:02:41 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote: > > >Thanks Data _Null_ seems I suck at copy and pasting. > > > > > >%Macro GetLabels( DataIn = ) ; > >%Local DSID GetValue GetVarName GetObs GetVarNum Close I ; > > > >%Let DSID = %SysFunc( Open ( &DataIn , ...

Re: SAS Sample 1727 #10
This program does not produce the expected result. excerpt from log: 31 options mprint; 32 Data TwoB ; 33 Input Var1 :$11. Var2 :$11. Var3 :$11.; 34 35 Label %GetLabels( DataIn = One ) ; MPRINT(GETLABELS): Var1 = Var2 = Var3 = 36 from output window. Variables in Creation Order # Variable Type Len 1 Var1 Char 11 2 Var2 Char 11 3 Var3 Char 11 On 5/1/07, toby dunn <tobydunn@hotmail.com> wrote: > Chang being picky asked for a couple of mods and well since it was just a > minor thingy: > > %Macro GetLabels(...

Re: SAS Sample 1727 #11
Thanks Data _Null_ seems I suck at copy and pasting. %Macro GetLabels( DataIn = ) ; %Local DSID GetValue GetVarName GetObs GetVarNum Close I ; %Let DSID = %SysFunc( Open ( &DataIn , IS ) ) ; %Let GetObs = %SysFunc( Fetch( &DSID , NoSet ) ) ; %Do I = 1 %To %SysFunc( Attrn( &Dsid , NVars ) ) ; %Let GetVarName = %SysFunc( VarName( &DSID , &I ) ) ; %let GetVarNum = %SysFunc( VarNum( &DSID , &GetVarName ) ) ; %Let GetValue = %SysFunc( GetVarC( &DSID , &GetVarNum ) ) ; &GetVarName = "%SuperQ( GetValue )" %End ; %Let Close ...

Re: SAS Sample 1727 #14
Chang , What I said was no one pays me on the list to add in all the error handleing I would normally throw in. But since you opened that can O' worms, much will depend on how you look at the solution, you could spend a hell of alot of code and time writing said code cleaning the Data that will eventually become the Label or you can have the code blow the heck up or you can expect the input data set to clean data to begin with. Neither extreme is a perfect choice, but then again I am not in the habit of trying to sit down and envision and compensate for every single little possibility t...

Re: SAS Sample 1727 #9
Chang being picky asked for a couple of mods and well since it was just a minor thingy: %Macro GetLabels( DataIn = ) ; %Local DSID GetValue GetVarName Close I ; %Let DSID = %Sysfunc( Open ( &DataIn , IS ) ) ; %Do I = 1 %To %Sysfunc( Attrn( &Dsid , NVars ) ) ; %Let GetVarName = %Sysfunc( Varname( &DSID , &I ) ) ; %Let GetValue = %Sysfunc( GetVarC( &DSID , &I ) ) ; &GetVarName = %SuperQ(GetValue) %End ; %Let Close = %Sysfunc( Close( &DSID ) ) ; %Mend GetLabels ; Data One ; Infile DataLines DSD ; Input Var1 :$11. Var2 :$11. Var3 :$11. ; DataLines4 ; La...

Re: SAS Sample 1727 #12
On Tue, 1 May 2007 23:02:41 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote: >Thanks Data _Null_ seems I suck at copy and pasting. > > >%Macro GetLabels( DataIn = ) ; >%Local DSID GetValue GetVarName GetObs GetVarNum Close I ; > >%Let DSID = %SysFunc( Open ( &DataIn , IS ) ) ; > >%Let GetObs = %SysFunc( Fetch( &DSID , NoSet ) ) ; > >%Do I = 1 %To %SysFunc( Attrn( &Dsid , NVars ) ) ; > %Let GetVarName = %SysFunc( VarName( &DSID , &I ) ) ; > %let GetVarNum = %SysFunc( VarNum( &DSID , &GetVarName ) ) ; > %Let...

Re: SAS System Viewer 9.1 unable to open SAS datasets ( SAS 9.1.3)
A question in return: is your table from windows? compressed from another system? and specially with personnel formats hard coded inside? Andre msiddu2000 a �crit : > SAS System Viewer 9.1 was able to open datasets that were created by > V8 engine (SAS 8.2), but is unable to open datasets that are created > with V9 engine (SAS 9.1.3). > > Does this need SAS System Viewer to be upgraded ? > or > Something else needs to be done ? > > -- Andr� WIELKI INED (Institut National d'Etudes D�mographiques) Service Informatique 133 Boulevard Davout 7598...

Re: RE : Re: copulas and SAS #3 674067
joewhitehurst@GMAIL.COM replied: > >Adel, > >You may find the following artilce interesting. [article by Thomas Mikosch not copied] This is a really good article, and a really useful point to make. But 55K is a lot of article to copy. Would it have been easier to point to a URL? The people who read SAS-L as a digest and the people who have slow connections are probably not overly thrilled. I'll refrain from pointing out that you sound like me today. ("Are you sure you want to do this? Here's some material which suggests you should try a different approach..."...

Web resources about - Re: SAS Sample 1728 Was ---> Re: SAS Sample 1727 #3 - comp.soft-sys.sas

Resources last updated: 2/9/2016 4:59:52 PM