Date: Tue, 29 Jan 2002 08:55:27 -0800
Reply-To: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject: Re: combining input records
Content-Type: text/plain
Two INPUT statements
The first to read starting date/time, id, and status
The second to read ending date/time, id, and status
Validity checks (ending date/time later than start, both id's equal,
starting status is STARTING, etc.)
When accepted, OUTPUT to SAS data set KEEPing both date/times, one id, and
ending status.
Barry Schwarz
OS/390 Systems Programmer
Phone: 253-773-4221
Fax: 253-773-1257
Mail stop: 80-JE
e-mail: barry.a.schwarz@boeing.com
> ----------
> From: Gordon Still[SMTP:gstill@SGI.SK.CA]
> Reply To: Gordon Still
> Sent: Tuesday, January 29, 2002 8:45 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: combining input records
>
> I have a raw data file like (see sample below). The records are variable
> length. I want to join records 1 and 2, 3 and 4, 5 & 6 etc. to give me a
> record with both the start and end times in it.
>
> 2000/04/01 22:51:00 - gi37pd20.8775: STARTING
> 2000/04/02 01:23:12 - gi37pd20.8775: ABENDED!!
> 2000/04/03 23:03:45 - gi37pd20.7832: STARTING
> 2000/04/04 01:59:33 - gi37pd20.7832: ENDED OK.
> 2000/04/04 22:54:36 - gi37pd20.27211: STARTING
> 2000/04/05 00:17:06 - gi37pd20.27211: ENDED OK.
> 2000/04/05 22:52:29 - gi37pd20.7224: STARTING
> 2000/04/05 23:23:21 - gi37pd20.7224: ENDED OK.
>
> What is the easiest way to do this?
> Your thoughts and comment appreciated.
>
> TIA
>
>
>
> ---
> Gordon Still -- IT Programmer/Analyst Phone : (306) 775-6383
> Systems Division - Autofund
> Saskatchewan Government Insurance Fax: (306) 569-7683
> 2260 - 11th Avenue
> Regina, SK S4P 0J9 E-Mail:
> gstill@sgi.sk.ca
>
|