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 (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 21 Jul 2006 09:19:54 -0700
Reply-To:   "Huang, Ya" <Ya.Huang@AMYLIN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Huang, Ya" <Ya.Huang@AMYLIN.COM>
Subject:   Re: Reset PDV after each output ?
Comments:   To: PuddingDotManAtGmailDotCom@listserv.cc.uga.edu
In-Reply-To:   <6a7d2f1a0607210857s32a59e6n4bec3ee7cd7e1776@mail.gmail.com>
Content-Type:   text/plain; charset="us-ascii"

Thanks! This is interesting. I'll see if I can find v9 to test it.

-----Original Message----- From: Pudding Man [mailto:pudding.man@gmail.com] Sent: Friday, July 21, 2006 8:58 AM To: Huang, Ya Cc: SAS-L@listserv.uga.edu Subject: Re: Reset PDV after each output ?

Ya,

If you are running V9, you might want to consider something using CALL MISSING.

Only minimally tested:

data anno; function='label'; color='red'; x=1; y=2; xsys='3'; cy='3'; link op; function='move'; x=1; y=4; link op; function='draw'; x=3; y=5; line=4; link op; return;

op: output; call missing(of _all_); return; run;

proc print; run;

Prost, Puddin'

***************************************************************** *** Puddin' Man PuddingDotMan at GmailDotCom ** *****************************************************************;

On 7/21/06, Ya Huang <ya.huang@amylin.com> wrote: > Thanks all for your response, though I haven't seen a satisfying > solution yet. The reason I ask this is that I need to do a lot of > setting var value, output etc. in preparing annotate data set for SAS > graph. It usually looks like this: > > data anno; > function='label'; color='red'; x=1; y=2; xsys='3'; y='3'; output; > function='move'; x=1; y=4; output; function='draw'; x=3; y=5; line=4; > output; .... > > > so you see, each line I change some of the vars value, and because PDV

> is not reset, var value previously set will be output too. In most > cases, it's not a problem, but sometimes, it may mess up the function > in that record. I want to have an easy way to reset PDV, so that I > don't have to remember which var should be set to missing. > > Ya > > > On Thu, 20 Jul 2006 15:54:25 -0400, Doug Rohde <drohde01@COMCAST.NET> wrote: > > >First off, to answer your question technically, the answer is no, the

> >PDV doesn't work that way. You could just set all the variables you > >want to missing after the first output statement thusly: > > > >data pdv (drop=i); > >array setmiss(*) x y z; > > > >length p 8. k $8.; > >x=1; > >y=2; > >z=5; > >output; > > > >do i = 1 to dim(setmiss); > > setmiss(i) = .; > >end; > > > >p=0; > >k='q'; > >output; > > > >run; > > > > > >But I'm sure you know that and are just looking for a shortcut. This > >leads me to ask what you are doing next that requires such an awkward

> >data structure? > > > >Doug R > > > > > > > >On Thu, 20 Jul 2006 13:53:03 -0400, Ya Huang <ya.huang@AMYLIN.COM> wrote: > > > >>Hi there, > >> > >>data pdv; > >>x=1; y=2; z=5; output; > >>p=0; k='q'; output; > >>run; > >> > >>proc print; > >>run; > >> > >>Obs x y z p k > >> > >> 1 1 2 5 . > >> 2 1 2 5 0 q > >> > >>What I want is: > >> > >>Obs x y z p k > >> > >> 1 1 2 5 . > >> 2 . . . 0 q > >> > >>In other word, I need to reset PDV after each output statement. > >>Is it possible? > >> > >>Thanks > >> > >>Ya >


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