SAS Component Language Dictionary |
Category: | Selection List |
Syntax | |
Details | |
Examples | |
Example 1: Opening a Catalog Entry | |
Example 2: Using the Advanced Button with an SCL List | |
See Also |
Syntax |
selection-item=OPENENTRYDIALOG(<type <,entry-name<,list-id>>>); |
contains the four-level name of the selected SAS file, or a blank if nothing is selected.
specifies the member types to list in the dialog window, such as CLASS, SCL, or FRAME. This can reduce the length of the list in the dialog window. If type is not used, the names of all catalog entry types in the data library are listed.
is a two- or four-level name of a catalog entry to call when a user selects the button in the dialog window. The entry can be any of the following types: FRAME, SCL, PROGRAM, HELP, CBT, or MENU.
If entry-name is not specified, then the window does not contain .
contains the identifier of an SCL list that is passed to entry-name.
Details |
OPENENTRYDIALOG displays a list of SAS catalog entries from which a user can make a selection. You can pass that selection to code that opens the catalog entry.
If entry-name is supplied and is selected, the item selected in the dialog window is passed to entry-name through the following variables, which are created automatically:
contains the list that is passed in the call to the OPENENTRYDIALOG and SAVEENTRYDIALOG functions.
List-id enables information to be passed between the calling entry and entry-name. It is passed to entry-name through the USERDATA variable.
Examples |
Select a catalog entry of type FRAME to open and display the selected entry.
selection=openentrydialog('frame'); call display(selection);
Specify an entry to call when a user selects , as well as an SCL list that contains values to pass to the entry. The entry can be any of the following types: FRAME, SCL, PROGRAM, HELP, CBT, or MENU. If entry-name is not specified, then the window does not contain .
dcl list mydata; mydata=makelist(); rc=insertc(mydata,'test'); selection=openentrydialog('frame', 'mylib.mycat.myentry.frame',mydata); if sysrc(1)=-1 then do; ...SCL statements to execute when the user cancels from the window... end; else do; ...SCL statements to handle selections... end;
The SCL entry for MYLIB.MYCAT.MYENTRY.FRAME contains the following program:
dcl char(8) libref type; dcl char(32) catalog entry; dcl list userdata; init: put libref=; put catalog=; put entry=; put type=; call putlist(userdata); return;
Note: The SCL entry must declare these exact variables, in the order specified, to properly reference the selected entry.
If the user selects MYLIB2.MYCAT2.MYENTRY2.FRAME in the dialog window and then selects , the output for this program islibref=Mylib2 catalog=Mycat2 entry=Myentry2 type=Frame ('test')[1]
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.