DATA Step, Macro, Functions and more

proc DS2: BASE driver, creation of a INTEGER column has been requested

Reply
Occasional Contributor
Posts: 8

proc DS2: BASE driver, creation of a INTEGER column has been requested

[ Edited ]

First things first. The SAS version of our company: 9.04.01M3P062415

 

Whenever using non double variables in proc ds2 variables like integer or dates, i.e.:

 

proc ds2 scond = error;
	data test (overwrite=yes);
		declare integer a b d;

		method run();
                        a = 3;
                        b = 4;
			d = a + b;
			output;
		end;
	enddata;
run;
quit;

 

I get the following Note in my log:

 

NOTE: BASE driver, creation of a INTEGER column has been requested, but is not supported by the BASE driver. A DOUBLE PRECISION 
      column has been created instead.

 

When solely using  double variables the proc ds2 runs smoothly.

 

Is there anything I can do to prevent this note? Does it have and impact on the performance or should I just ignore it?

 

I'd be thankful for any hint.

 

Super User
Posts: 6,945

Re: proc DS2: BASE driver, creation of a INTEGER column has been requested

Base SAS only knows two data types, character and numeric. All numeric variables are always stored as 8-byte (or less, if you specify it with a LENGTH statement) real (mantissa and exponent) numbers. All SAS tables are stored with these limits.

 

So the note just informs you that your numbers will be stored that way; since there is no other option, there is also no performance penalty or other negative effect. Just keep in mind that you may run into precision problems a little earlier than the overflow error you'd expect with 8-byte integers.

To avoid the NOTE, just stay with double.

 

Then why is "integer" there at all? If you run PROC DS2 against a table that is not a native SAS table, but in a database, and the database engine supports integer, then it will have an effect.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 1 reply
  • 300 views
  • 3 likes
  • 2 in conversation