What does `.Z` mean in SAS?

I apologize for such a completely uninformed question, but I don’t know any SAS and just want to know what one line of code does, so I hope someone can help. I have a loop over an array of variables and an if clause based on a comparison with .Z , but this variable is not defined anywhere, so I assume this is a kind of SAS syntax trick. Here's the loop:

 ARRAY PTYPE{*} X4216 X4316 X4416 X4816 X4916 X5016; DO I=1 TO DIM(PTYPE); IF (PTYPE{I}<=.Z) THEN PUT &ID= PTYPE{I}=; END; 

So, in the first iteration, the loop checks to see if the value in X4216 less than .Z , and then ...? ID is another variable in the dataset, but I don't know what happens on the right side of this if clause. I briefly looked at the SAS documentation to find out that ampersands are related to macros, but my knowledge of SAS is limited to understand what is going on.

Can someone enlighten me?

+6
source share
1 answer

.Z is a special missing value. In SAS, a missing value (what you might call a NULL value) is indicated by a period. There are also 27 other missing values, which are indicated by a period followed by a letter or underline. Missing values ​​are different and are considered smaller than any actual number .. Z is the "largest". Thus, PTYPE{I}<=.Z basically checks to see if a value is missing. Instead, you can use MISSING(PTYPE{I}) to perform the same test. The right side writes the name and value of the variable in the array with the missing value, as well as the name and value of the variable specified in the identifier of the macro variable.

+11
source

All Articles