Presentation is loading. Please wait.

Presentation is loading. Please wait.

A SAS User's Guide to Storage Management Allan Page Senior Marketing Analyst Canadian Tire Financial Services.

Similar presentations


Presentation on theme: "A SAS User's Guide to Storage Management Allan Page Senior Marketing Analyst Canadian Tire Financial Services."— Presentation transcript:

1 A SAS User's Guide to Storage Management Allan Page Senior Marketing Analyst Canadian Tire Financial Services

2 Files are stored on all system types  PC (All flavours of Windows)  File or Application Servers (Novell, NT, Y2KServer)  Mid-Range Systems (Unix, etc.)  Mainframes (MVS)

3 All systems have two thing in common When the drives are full, they’re full ! You can’t add data to a full drive !

4 Disk drives come in different sizes

5 Tip # 1  WILL I EVER, EVER NEED THIS FILE AGAIN?

6 Tip # 1  WILL I EVER, EVER NEED THIS FILE AGAIN?

7 Tip # 2  What if you said yes?

8

9 I need the file right away …..

10 I need it in the near future …...

11  MVS uses HSM System  UNIX uses GZIP  Windows uses Winzip  Windows XP with NTFS has zip and compression utilities

12 I need it in the distant future …..

13  MVS HSM will migrate to tape  UNIX systems may have access to tape storage.  For Windows, consider storing on CD

14 SAS Specific Storage Efficiencies  Don’t keep duplicate files or subsets  Don’t keep unnecessary rows of data  Don’t keep unnecessary columns of data

15 How to create a view or use Where.  There are two types of views 1.Data step views 2.SQL views

16 What a view is - and is not  A view IS a MAP to read other data in a specified form.  A view IS NOT a data store.

17 Creating and using a Data Step View

18 Creating and Using a SQL View

19 The LENGTH Statement  Numeric variables have a default length of 8  Character variables default to the length of first use.  Use the LENGTH statement to override the default values.

20 What length should I use for numeric values?

21 When to use the LENGTH statement.  It is best to use the LENGTH statement before any reference to the variable is made either by reading data or assigning values.

22 Why is position important? When SAS compiles a DATA Step, the attributes of the DATA Set are determined. All statements for an attribute, EXCEPT for the length of the variable, are applied to the variable in order.

23 Why is position important? The length attribute for numeric variables is not applied to the variable while it is being manipulated in the step. If the length of a numeric variable is shortened the truncation does not occur until the observation is written out to the output data set.

24 Why is position important? The length attribute for character variables is determined by it's first occurrence.

25 Let’s look at some data.

26 The actual contents of this file

27 The wrong way to use the LENGTH statement

28 The correct way to use the LENGTH statement

29 Using LENGTH in a SQL Query

30 Setting length in the ATTRIB statement

31 Data Compression  Can be set in an options statement or as a data step option.

32 Data Compression  Can be set in an options statement or as a data step option.

33 Data Compression  Compresses the data set by reducing repeated consecutive characters to two- or three-byte representations.

34 Data Compression - Advantages  Reduced storage requirements for the data set  Fewer input and output operations necessary to read from or write to the data set during processing.

35 Data Compression - Disadvantages  may not compress at all (may actually make the file larger), but a message detailing the amount of compression is provided  more CPU resources are required.

36 Compression - A good example

37 Compression - A bad example

38 Copyright © 2003, SAS Institute Inc. All rights reserved. 38


Download ppt "A SAS User's Guide to Storage Management Allan Page Senior Marketing Analyst Canadian Tire Financial Services."

Similar presentations


Ads by Google