Dividing data based on size

Reply
Frequent Contributor
Posts: 85

Dividing data based on size


I want to divide data based on size

eg

data example ;

input no name$;

datalilnes;

1 raj

2 kumar

3 scott

.

.

.

100 tom

;

run;

i want text output divied based on size (ie eg 0.5 mb ) each data

if data is 1.5 mb then i want 3 output with size 0.5 mb

Super Contributor
Posts: 644

Re: Dividing data based on size

Unless you use the compress option SAS data records are stored as fixed length, arranged in pages.  You should be able to use Proc Contents on the subsets of the data (eg 100 rows and 1100 rows) to find the additional space used per 1000 rows, then calculate the number of rows you can safely store in each dataset.  NB the dataset header takes up space, which you need to include (hence using 2 different subsets you can calculate the header size).  Then it is simply a matter of counting rows to calculate how many tables you need to create. 

Richard

Ask a Question
Discussion stats
  • 1 reply
  • 137 views
  • 0 likes
  • 2 in conversation