LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 5 Jun 2008 14:07:52 -0400
Reply-To:     Nathaniel.Wooding@DOM.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject:      Re: array statement
Comments: To: SUBSCRIBE SAS-L Anonymous <lqiantobe22@YAHOO.COM>
In-Reply-To:  <200806051757.m55AkqMV027229@malibu.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

This can be done with a merge operation

Data A; input ID Visit @15 Date mmddyy8.; cards; 001 1 1/1/08 001 3 2/1/08 001 4 3/1/08 001 7 4/1/08 002 25 5/1/08

Data B ; input ID Visit @15 Date mmddyy8.; cards; 001 54 1/1/08 001 54 2/25/08 001 54 3/16/08 001 54 3/25/08 002 54 5/1/08 run;

Data final; merge a (drop = visit in=in1) b (drop = visit in=in2); by id date; if in1 and in2; run; Proc print; format date mmddyy8.; run;

Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977

SUBSCRIBE SAS-L Anonymous <lqiantobe22@YAHO To O.COM> SAS-L@LISTSERV.UGA.EDU Sent by: "SAS(r) cc Discussion" <SAS-L@LISTSERV.U Subject GA.EDU> array statement

06/05/2008 01:57 PM

Please respond to SUBSCRIBE SAS-L Anonymous <lqiantobe22@YAHO O.COM>

Two data sets: A: ID Visit Date 001 1 1/1/08 001 3 2/1/08 001 4 3/1/08 001 7 4/1/08 002 25 5/1/08

B: ID Visit Date 001 54 1/1/08 001 54 2/25/08 001 54 3/16/08 001 54 3/25/08 002 54 5/1/08

I want to compare "date" b/w A and B, nd list the same date. so, the result comes out : ID Date 001 1/1/08 002 5/1/08

I try to transpose these data sets,then compare one by one, but i was thinking is there more easy way? Can i use "array statement" to figure it out? anyone can help me on the logic of "array". Appreciate.

----------------------------------------- CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


Back to: Top of message | Previous page | Main SAS-L page