f



Re: &&&&&& #6

This is a prime example I use when I discuss what is wrong with the macro
language. Yes, you can figure it out but an alternative would be to simply
write your data step code out and then bring it back in so you know what is
being submitted.

data _null_ ;
   file 'c:\myfile.sas' ;
   put 'data ...;' ;
   ...more put statements...
run;

%include 'c:\myfile.sas' ;

Others will argue for SCL or something else. Regardless, this application
probably requires a complete rethink if you are using 6 ampersands.

Thanks,
Alan

Savian
"Bridging SAS and Microsoft Technologies"

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Talbot
Michael Katz
Sent: Thursday, June 09, 2005 11:39 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: &&&&&&

Hi.

It requires SIX ampersands to resolve the macro variable example below:

data _null_ ;
 set DS1 end = last ;
 call symput("mlv" || compress(put(_N_,best32.)), mli)
 ;
 call symput(mli, tdt) ;
 if last then do ;
  call symput("mlin", compress(put(_N_,best32.))) ;
 end ;
run ;
%put &&mlv&mlin.  = &&&&&&mlv&mlin. ;

(So, if there are five observations in the data set, and the fifth value of
mli is "DAISY" and the fifth value of tdt is "YELLOW" this will print
out "DAISY = YELLOW")

Why does it take so many ampersands to resolve?  Can someone please explain
this resolution to me so that it gets through my extremely dense skull?

Thanks!


--  TMK  --
"The Macro Klutz"
0
SASL001 (990)
6/9/2005 6:20:06 PM
comp.soft-sys.sas 142828 articles. 1 followers. Post Follow

0 Replies
708 Views

Similar Articles

[PageSpeed] 13

Reply:

Similar Artilces:

Re: &&&&&&
Talbot, Its basic macro aper math. With each pass of the macro processor it reduces && to &. in yoru case: %put &&mlv&mlin. = &&&&&&mlv&mlin. ; 1st pass: &mlv5 = &&&mlv5 2nd Pass: Daisy = &Daisy 3rd Pass : Daisy = Yellow Toby Dunn From: Talbot Michael Katz <topkatz@MSN.COM> Reply-To: Talbot Michael Katz <topkatz@MSN.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: &&&&&& Date: Thu, 9 Jun 2005 13:38:44 -0400 Received: from malibu.cc.uga.edu ([128.192.1.103]) by MC8-F21.hotmail...

Re: &&&&&& #8
On Thu, 9 Jun 2005 13:38:44 -0400, Talbot Michael Katz <topkatz@MSN.COM> wrote: >Hi. > >It requires SIX ampersands to resolve the macro variable example below: > >data _null_ ; > set DS1 end = last ; > call symput("mlv" || compress(put(_N_,best32.)), mli) > ; > call symput(mli, tdt) ; > if last then do ; > call symput("mlin", compress(put(_N_,best32.))) ; > end ; >run ; >%put &&mlv&mlin. = &&&&&&mlv&mlin. ; > >(So, if there are five observations in the data set, and the fifth va...

Re: &&&&&& #3
toby dunn <tobydunn@hotmail.com> replied: > Alan, > > I disagree with that statement. I think the best solution would be to build > the dang thing the way he want with less macros. By sending your code out > then back in is in MO to much hassel for too little. > > the whole thingy could be done like this: > > data one ; > flower = 'Daisy' ; > color = 'Yellow' ; > run ; > > data two ; > set one ; > call symput ( compress('text'||_n_),compbl(flower||'='||color) ) ; > call symput ( 'index' , compre...

Re: &&&&&& #2
Alan, I disagree with that statement. I think the best solution would be to build the dang thing the way he want with less macros. By sending your code out then back in is in MO to much hassel for too little. the whole thingy could be done like this: data one ; flower = 'Daisy' ; color = 'Yellow' ; run ; data two ; set one ; call symput ( compress('text'||_n_),compbl(flower||'='||color) ) ; call symput ( 'index' , compress(_n_) ) ; run ; %put &&text&index ; Toby Dunn From: Alan Churchill <SASL001@SAVIAN.NET> Reply-To: A...

Re: &&&&&& #10
Thank you, Toby et al for your answers, opinions, advice, criticism, etc. I almost think I'm beginning to get it. Let me regurgitate this to be sure: Given &&&&&&mlv&mlin., I resolve &mlin. = 5 and reduce the &&&&&& to &&& to get &&&mlv5. Then I resolve &mlv5. = DAISY and reduce the && to & to get &DAISY. Finally I resolve &DAISY. = YELLOW. So, it looks to me like once I reach a stage where I have a string of ampersands followed by a "pure" name (i.e., one with no ampersa...

Re: &&&&&& #4
> From: Talbot Michael Katz > It requires SIX ampersands to resolve the macro variable > example below: > > data _null_ ; > set DS1 end = last ; > call symput("mlv" || compress(put(_N_,best32.)), mli) > ; > call symput(mli, tdt) ; > if last then do ; > call symput("mlin", compress(put(_N_,best32.))) ; > end ; > run ; > %put &&mlv&mlin. = &&&&&&mlv&mlin. ; > > (So, if there are five observations in the data set, and the > fifth value of > mli is "DAISY" and the fi...

Re: &&&&&& #13
Bold=Ian Whitlock Faint Italics=Joe Whitehurst A macro variable can be thought of as a name pointing at a value. A named scl list item can be thought of as a name pointing at a value. So a name can point at a name that can point at a value, etc. So a named scl list item can be thought of as a named scl list item that can point at a named scl list item that can point at a named scl list item that can point at a value which can continue to whatever level of abstraction you wish without ever using any concatenated ampersands. Let's look at the problem by analogy. Suppose you go to a pa...

Re: &&&&&& #7
Alan, I seem to have started a hail storm here and I probably should have stated earlier that I don't disagree with SCL or a rework of the code, but rather building and then sending the code out to a temp file and then %including it back in I like not. I have found that while in certain situations this may be the only way to accomplish something easily, it is over used and causes way more headaches than it is worth. As for the rest of your post I am right behind you. Toby Dunn From: Alan Churchill <SASL001@SAVIAN.NET> Reply-To: Alan Churchill <SASL001@SAVIAN.NET> To: ...

& and &amp;
How can one stop a browser from converting &amp; to & ? We have a textarea in our system wehre a user can type in some html code and have it saved to the database. When the data is retireved and redisplayed it is displayed as simply &. HTML snippet: <TEXTAREA NAME="p_html" ROWS=6 COLS=70 ALIGN="VIRTUAL" WRAP="YES"> fred & &amp; </TEXTAREA> When displayed, the user predictably sees fred & & What workarounds are there for this - I am sure it's a problem for others - is there a way...

&& and &
What exactly is the difference between && and & (|| and |)? When does it generates different results? Is the & wrong now from R14 on? Best regards Prom Prom wrote: > What exactly is the difference between && and & (|| and |)? When does > it generates different results? Is the & wrong now from R14 on? > > Best regards > Prom 'help &' shows: Logical operators. Short-circuit logical AND && Short-circuit logical OR || and - Element-wise logical AND &...

'&&&&a'="&&&&a."
I need a data step that is equivalent to data _NULL_; file print; put '&&&&&&a=' "&&&&&&a"; run; Yet the number of & is a variable, I need to write a Macro, so far I got only half of the code('&&&&&&a.='), I don't know how to put the other half ("&&&&&&a.") into Macro Thanks. %Macro R(k); data _NULL_; file print; put %do i= 1 %to &k.; '&' %end; 'a=' ; run; %mend; %R(10); ==================================================...

A && B && ( C && D )
Hi all, I've four conditions expression, A, B, C, and D. Are the following two forms equivalent or not? A && B && ( C && D ) A && B && C && D Regards -- ..: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :. Hongyi Zhao <hongyi.zhao@gmail.com> wrote: >Are the following two forms equivalent or not? > >A && B && ( C && D ) >A && B && C && D Yes. In either case, _all_ variables must be true for the expression to be true. The AND operato...

Rebuilding... Over & over &over &over...
Does anyone know what would cause an assembly to keep rebuilding over & over after every move I make? After every mate, axis inserted, or sketch editied, it rebuilds & rebuilds ten to fifteen times for one or two minutes. It took me ten minutes to position three parts in a small assembly of a mold. It seems to be rebuilding the same part over & over. This mold has three main parts & about ten pieces of hardware (pins, bushings, etc...), so it should not take more than a couple of seconds to rebuild. Could a circular reference cause this? If so, how would I find it? Maybe ...

& versus &&
When I use &, I get the following message: "Use && instead of & as the AND operator in (scalar) conditional statements." I wanted to compare two vectors element by element, as well write a conditional statement for just one of the elements of one of the vectors (i.e., solution1(13)>=0 & solution1~=solution2). If I use &&, I can't compare the two vectors as a whole, i.e., element by element. On a simple test I performed, it seemed that & worked fined for writing a conditional statement for just one of the elements. I hope I'm makin...

&#1096;&#1083;&#1102;&#1093;&#1080; &#1084;&#1086;&#1089;&#1082;&#1074;&#1072; &
'[image: http://spy-soft-phone.com/sosihuy/2598.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1085;&#1086;&#1074;&#1086;&#1089;&#1080;&#1073;&#1080;&#1088;&#1089;&#1082; &#1076;&#1086;&#1089;&#1091;&#1075; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1075; &#1074;&#1086;&#1083;&#1078;&#1089...

&#1096;&#1083;&#1102;&#1093;&#1080; &#1089; &#1072;&#1089;&#1073;&#1077;&#1089;&
'[image: http://spy-soft-phone.com/sosihuy/606.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1096;&#1083;&#1102;&#1093;&#1080; &#1103;&#1089;&#1085;&#1086;&#1075;&#1086;&#1088;&#1089;&#1082;&#1072; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1075;&#1086;&#1088;&#1086;&#1076;&#1072; &#1074;&#1099;&#1073;&#1086;&#1088;&#1075;&#1072; &#1080;&#1085;&#1090;&#1080;&#1084...

&#1075;&#1076;&#1077; &#1089;&#1085;&#1103;&#1090;&#1100; &#1087;&#1088;&#1086;&
'[image: http://spy-soft-phone.com/sosihuy/1621.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1048;&#1084;&#1077;&#1085;&#1085;&#1086; &#1087;&#1086;&#1101;&#1090;&#1086;&#1084;&#1091; &#1084;&#1099; &#1089; &#1052;&#1080;&#1083;&#1080; &#1088;&#1077;&#1096;&#1080;&#1083;&#1080; &#1085;&#1072;&#1095;&#1072;&#1090;&#1100; &#1089;&#1082;&#1072;&#1078;&#1077;&#1084; &#1090;&#1072;&#1082; &#1074;&#1089;&...

&#1084;&#1086;&#1089;&#1082;&#1074;&#1072; &#1075;&#1076;&#1077; &#1089;&#1085;&
'[image: http://spy-soft-phone.com/sosihuy/745.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1047;&#1072; &#1089;&#1090;&#1086;&#1083;&#1086;&#1084; &#1089;&#1080;&#1076;&#1077;&#1083; &#1093;&#1091;&#1076;&#1086;&#1097;&#1072;&#1074;&#1099;&#1081; &#1074;&#1099;&#1089;&#1086;&#1082;&#1080;&#1081; &#1084;&#1091;&#1078;&#1095;&#1080;&#1085;&#1072; &#1074; &#1088;&#1072;&#1074;&#1085;&#1086;&#1084; &#1...

&#1096;&#1083;&#1102;&#1093;&#1080; &#1084;&#1086;&#1089;&#1082;&#1074;&#1099; &
'[image: http://spy-soft-phone.com/sosihuy/2659.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1095;&#1077;&#1095;&#1077;&#1085;&#1089;&#1082;&#1080;&#1077; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1074; &#1084;&#1086;&#1089;&#1082;&#1074;&#1077; &#1080;&#1085;&#1090;&#1080;&#1084;&#1091;&#1089;&#1083;&#1091;&#1075;&#1080; &#1074; &#1084;&#1086;&#1089;&#1082;&#107...

&& and ||
How can I use this: if (!zxmes && self.name != "menu") and add if (zmes == 1) if (!zxmes && self.name != "menu" || zmes == 1) and make it work. "find clausen" <no@no987.no> wrote in message news:ceopr2dsb063hh2si2kd18812lprkanafv@4ax.com... > How can I use this: > > if (!zxmes && self.name != "menu") > > and add if (zmes == 1) > > if (!zxmes && self.name != "menu" || zmes == 1) > > and make it work. There is nothing wrong with that as is. JavaScript is smart enough to k...

&& and |
I want to make sure that I am correct in thinking that two ways of doing things are equivalent. I'm using "if" statements to test the solutions to the function my program is dealing with. Is there a difference between saying If [something] && [something] [statements] end If [something] && [something] [statements] end and saying If [something] && [something] | [something] && [something] [statements] end Is there a difference if "statements" are the same? I.e., the first time you simply have two if statements and the...

|| and &&
One of the things I have yet to fully grasp ( of many things) is when to use, for example if (c !=b || c !=e || c !=f)....etc versus if ( (c !=b && c !=e && c !=f) What is the real practical difference between these, and if this is not a good example of the problem, could someone perhaps give a better example and explanation. Thanks in advance. mdh wrote: > One of the things I have yet to fully grasp ( of many things) is when > to use, for example > > if (c !=b || c !=e || c !=f)....etc > > versus > > if ( (c !=b && c !=e && c !=f...

What does &&= do?
I came across &&= while reading some code. I know what ||= does but not this one. Can someone explain what it does? Thanks much -subbu On Tue, Mar 18, 2008 at 7:09 AM, Subbu <subramani.athikunte@gmail.com> wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it does? > > Thanks much > -subbu a &&=b is a shortcut for a = a && b Subbu wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it doe...

#@&&## it !
Men of Valor: Vietnam .... I've been down a rathole all weekend. Crawled down every tunnel, cut every wire ... and BOOM, the next trap gets me. Restarted this level maybe 10 times now. Last time, I even drew a picture of the tunnels, and made notes to avoid the traps. Got all the way through the level, finding the intel docs, and made it back to the entry hole I crawled down to get in the tunnels. I crawl into the main room and find 3 marine buddies crouching there. Can't really tell what happened next, but as we were talking .. BOOM .. and Lt Snagglepuss is writing a letter home again...

Web resources about - Re: &&&&&& #6 - comp.soft-sys.sas

Resources last updated: 3/13/2016 7:08:33 PM