| Date: | Fri, 25 May 2001 15:02:35 -0400 |
| Reply-To: | "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Dorfman, Paul" <Paul.Dorfman@BCBSFL.COM> |
| Subject: | Re: vanishing index after data step update |
|
| Content-Type: | text/plain; charset=iso-8859-1 |
Harry,
No wonder the index gets lost, for you are rewriting the master file with
UPDATE. If you want to preserve the index, use the indexed, rather than
sequential, access. For example, use you transaction file as a driver for
MODIFY, or use it to construct an SQL query updating the master. This way,
the existing index will be used to locate the key records and will be
updated accordingly should any new keys be inserted. Good luck.
Kind regards,
=====================
Paul M. Dorfman
Jacksonville, Fl
=====================
-----Original Message-----
From: Droogendyk, Harry [mailto:Harry.Droogendyk@CIBC.COM]
Sent: Friday, May 25, 2001 1:54 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: vanishing index after data step update
Listers:
I'm running an OS/390 batch job that updates a master SAS dataset with
transactions via the data step update verb. Both datasets are indexed
before the data step. After the datastep, the master dataset no longer has
an index. I've verified this fact by running PROC CONTENTS before and after
the dataset.
The master dataset has roughly 5000 obs, the transaction 2400. Log and
output follow. Same results using version 6 or 8. Any ideas as to what's
going on?
TIA,
Harry
Portion of the log:
282 title 'Harry BUSCARD after SQL';
283 proc contents data=work.buscard;
284 run;
NOTE: The PROCEDURE CONTENTS used 0.00 CPU seconds.
NOTE: The PROCEDURE CONTENTS printed page 176.
285
286
/******************************************************************
287 For matched records, the only fields we want to update are
288 rptlvl, titleid, endlvl and update audit fields. Preserve the
289 name, phone number etc... as they may have been updated.
290
/******************************************************************/
291
292 data buscard;
293 update buscard
294 outfa.buscard ( keep = userid rptlvl titleid endlvl
295 upduser upddate updtime );
296 by userid;
297 run;
NOTE: The data set WORK.BUSCARD has 4818 observations and 15 variables.
NOTE: The DATA statement used 0.06 CPU seconds.
298 *harry;
299 title 'Harry BUSCARD after update';
300 proc contents data=work.buscard;
301 run;
Output:
Harry BUSCARD after SQL
CONTENTS PROCEDURE
Data Set Name: WORK.BUSCARD Observations:
4818
Member Type: DATA Variables: 15
Engine: V609 Indexes: 1
Created: 11:42 Friday, May 25, 2001 Observation Length: 163
Last Modified: 11:43 Friday, May 25, 2001 Deleted Observations: 530
Protection: Compressed: NO
Data Set Type: Sorted: NO
Label:
Harry BUSCARD after update
CONTENTS PROCEDURE
Data Set Name: WORK.BUSCARD Observations:
4818
Member Type: DATA Variables: 15
Engine: V609 Indexes: 0
Created: 11:43 Friday, May 25, 2001 Observation Length: 163
Last Modified: 11:43 Friday, May 25, 2001 Deleted Observations: 0
Protection: Compressed: NO
Data Set Type: Sorted: NO
Label:
Blue Cross Blue Shield of Florida, Inc., and its subsidiary and
affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.
|