What are other functions like _null_?

Reply
Occasional Contributor
Posts: 7

What are other functions like _null_?

Hi I am relatively to SAS and I am learning it on my own. Recently I have discovered '_null_' function and as far as I understand it allows you to create a virtual data set without really creating it say in work library. I have several questions.

  1. What are the benefits of it if you could just as easily create a data set in work library?
  2. And what other similar 'functions' cause i do recall seeing something with underscore in them say _example_, and what do they do?

Many thanks,

Stan

SAS Super FREQ
Posts: 683

Re: What are other functions like _null_?

For more information on names in the SAS Language check out the documentation

As a general advice, do not use names that start and end with an underscore.

Use case for the _NULL_: if the DATA Step is to wright a text file, there is no need to create a SAS data set

Super User
Posts: 6,936

Re: What are other functions like _null_?

You use data _null_ if you need the functionality of the data step for something other than creating SAS data sets.

- Calculating macro variables

- Writing a flat file

- check something and write a comment into the log of a longer job

- testing something for yourself to check if your line of thought is sane Smiley Wink

and so on

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 2 replies
  • 175 views
  • 0 likes
  • 3 in conversation