Dividing data based on size

Frequent Contributor
Posts: 89

Dividing data based on size

I want to divide data based on size


data example ;

input no name$;


1 raj

2 kumar

3 scott




100 tom



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. 


Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation