Date: Fri, 7 Jul 2006 13:20:47 -0400
Reply-To: Venky Chakravarthy <swovcc@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Venky Chakravarthy <swovcc@HOTMAIL.COM>
Subject: Re: finding minimum value in most efficient manner
Can you repost your original sample with dates added instead? It makes it
easier for anyone willing to respond. Thanks.
On Fri, 7 Jul 2006 13:00:27 -0400, plessthanpoinohfive
<plessthanpointohfive@GMAIL.COM> wrote:
>ACK! Yes, of course. There is are begindt and enddt variables.
>
>The data are sorted by time but of course we'd need the actual dates...
>
>OK, so here is an actual subset of the real data.
>
>
>id
>begindt
>enddt
>months
>jobtitle
>
>1
>12/29/1941
>11/20/1942
>1
>LAB ASST
>
>1
>12/29/1941
>11/20/1942
>11
>LAB ASST
>
<snip>
>
>Thanks, and sorry for being incomplete!
>
>Jen
>
>
>-----Original Message-----
>From: toby dunn [mailto:tobydunn@hotmail.com]
>Sent: Friday, July 07, 2006 12:52 PM
>To: plessthanpointohfive@GMAIL.COM; SAS-L@LISTSERV.UGA.EDU
>Subject: RE: finding minimum value in most efficient manner
>
>Jen ,
>
>Is there a Date variable that we need to be aware off. Otherwise your
>before and after jobs that you say you want are arbitrary.
>
>
>Toby Dunn
>
>
>
>
>
>From: Jen Sabatier <plessthanpointohfive@GMAIL.COM>
>Reply-To: Jen Sabatier <plessthanpointohfive@GMAIL.COM>
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: finding minimum value in most efficient manner
>Date: Fri, 7 Jul 2006 12:44:01 -0400
>
>Hello, all,
>
>I have a dataset of individual's work histories. So, there is are columns
>for id, jobtitle, months.
>
>data hx;
>input id jobtitle $ months;
>datalines;
>1 Floater 3
>1 Operator 1
>1 Crew 8
>1 Manager 30
>2 Operator 5
>2 Crew 2
>3 Helper 1
>4 Helper 10
>4 Operator 56
>4 Supervisor 22
>4 Manager 10
>.
>.
>.
>;
>
>
>So, we have unequal lengths to the actual work history. Some people held
>several jobs, some just a few, and some only one.
>
>What I need to do is locate the shortest job held for each person for
people
>who held more than one job, flag it and the jobs before and/or after it. I
>will need to examine the previous and/or prior job along with the shortest
>job. If a person held only one job then I need to flag them seperately.
>
>I've tried to do this with an array but I can't make it work. I know it
>must be simple.
>
>Hope someone can help!
|