|
David,
Right! You can have as many as your memory can hold, without any known
adverse implications. More over, it might also be worth ointing out that the
limit of 2**15-1 is imposed on the number of variables that can be stored in
a SAS data set's descriptor, but not in the compiler symbol table. The
latter (again, depending just on memory) can fit lotsa more. This will have
no problem running, even though the compiler needs arrange all A: and B:
guys in their own memory boxes inorder that the programmer could manipulate
them:
data smth (keep = A: ) ;
array Z (*) A1-A32767 B1-B32767 ;
run;
Of course, if I do not keep the Bs, why not make then temporary? Well,
suppose I am merging, and As come from A, and Bs come from B.
Kind regards,
=======================
Paul M. Dorfman
Jacksonville, Fl
=======================
-----Original Message-----
From: David L. Cassell [mailto:Cassell.David@EPAMAIL.EPA.GOV]
Sent: Wednesday, May 30, 2001 11:55 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Number of Vars in a SAS 8.x Data Set
Bart Heinsius wrote:
> I submitted on the following on SAS8.2 and WinNT:
>
> data a;
> array v(33000);
> run;
>
> and got:
>
> ERROR: Too many variables defined for file WORK.A. This file may not
have more than 32767
> variables.
Bart demonstrated the limit used for the number of variables allowed in the
PDV, but I just wanted to point out that you can get a lot more variables
in an *array* if they're not in the PDV for the data set. Try:
7 data temp1;
8 array arr{10000000} _temporary_;
9 run;
NOTE: The data set WORK.TEMP1 has 1 observations and 0 variables.
NOTE: DATA statement used:
real time 14.60 seconds
Yes, that is ten million elements in the array. The system required
14.60 seconds to execute because it had to swap out to disk to find
enough memory [a PC running v8.1 and win95], but it still will do a
phenomenal number of elements - if you need all of them. Right, Paul?
David
--
David Cassell, CSC
Cassell.David@epa.gov
Senior computing specialist
mathematical statistician
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.
|