Syntax Supported by the IML Procedure and the iml Action

STRUCT Call

CALL STRUCT (object <, optList>) ;

This subroutine is supported by the IML procedure and the iml action.

The STRUCT subroutine prints the structure of any SAS/IML object. Although the STRUCT subroutine is mainly used for lists, you can also pass in a matrix or a table.

You must specify the following argument:

object

specifies the SAS/IML object whose structure you want to print.

You can also specify the following argument:

optList

is a named list that specifies one or both of the following values:

FirstFew

prints the first FirstFew values of the object, where FirstFew is a nonnegative integer. The default value is 4.

Truncate

prints the first Truncate characters, where Truncate is a positive integer. The default is to print the first 10 characters.

For an example of the output, see the example in the ListPrint subroutine. The following program demonstrates the use of the optional argument:

M = {1 2, 3 4};
C = {"Shakespeare, William","Austen, Jane",
     "Dickens, Charles","Woolf, Virginia"};
sublist = [1:5, 'String1':'String4'];
L = [M, C, sublist];

opt = [#"FirstFew"=3, #"Truncate"=7];
call Struct(L, opt);

Figure 401: Output from the STRUCT Subroutine

Symbol Description
NameLevelTypeDimensionsVALUE1VALUE2VALUE3More
L0List3 ItemsL$1L$2L$3 
 L$11Numeric2 x 2123...
 L$21Character4 x 1ShakespAusten,Dickens...
 L$31List2 ItemsL$3$1L$3$2  
  L$3$12Numeric1 x 5123...
  L$3$22Character1 x 4String1String2String3...


Last updated: March 08, 2024