SAS/AF: SCL List Model subclass for viewing SCL Lists in a Table
Viewer
How often have you used CALL PUTLIST(...)
to examine a list at run-time ?
Well, now you have an alternative.
Use this SCL List Model subclass to examine an SCL List in a Table Viewer Control. The Viewer will display the name and value of each item in the SCL List of interest, and will expand or collapse items of type list or object when they are selected (clicked). Each time an item is expanded, the names of it's items will be indented more and the cell background color will become darker. Additionally, if an item is of type number and the value is a valid SCL List, the item can be expanded when the number is clicked.
This visualization of an SCL List is a flattened hierarchical view.
Example:
- A frame has a Table Viewer Control named viewer and an SCL List Content Model named model.
init: viewer.modelId = model; dcl list someList = { A=1 , B='X' , C= { abc=1 , def='ghi' , 1 , 2 , 3 , end='near' } , 'last' }; model.viewListId = someList; return;
![]() |
![]() |
The download contains six items
- SclListContentModel_c.class
- SclListContentModel_cclass.scl
- ModelDemo.frame
- ModelDemo.scl
- ExamineList.frame
- ExamineList.scl
Class usage:
- Drag and drop a Scl List Content Model onto a Table Viewer Control.
- Set the model attribute .viewListId to the SCL List you want to examine. The information in the list will appear in the Table.
- You can modify the indenting amount by setting the model attribute .indent to a positive value of your choosing.
List viewing utility:
- From SCL, for debugging and discovery:
call Display ('Common.SclListView.ExamineList.Frame', listId);
- From SAS Explorer, Action Command for Member type SLIST:
afa c=Common.SclListView.ExamineList.Frame entry=%8b.%32b.%32b.%8b
An AF object instance is an SCL List, so you can examine details of an object at run-time by using an objects id in place of listId. The ModelDemo.frame demonstrates this feature.
AFA C=COMMON.SCLLISTVIEW.MODELDEMO.FRAMECopyright 2001 Richard A. DeVenezia This page was last updated 27 January 2005.