Language Reference


PARENTNAME Function

PARENTNAME ("argument");

The PARENTNAME function enables you to determine the name of a matrix that is passed into a SAS/IML module. If an argument is skipped or the argument is called with an expression, the PARENTNAME function returns a blank character.

start GetName(a=0);
   pa = ParentName("a");
   return( pa );
finish;

x = 1:5;
n1 = GetName(x);                     /* name is "x" */
n2 = GetName(1:5);                   /* temporary matrix, no name */
n3 = GetName();                      /* skipped argument, no name */
print n1 n2 n3;

Figure 25.271: Names of Matrices That Are Passed into a Module

n1 n2 n3
x