SAS Component Language Dictionary |
Category: | Cursor |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
wvar-name=CURFLD(); |
contains the name of the FRAME or PROGRAM entry control or field on which the cursor is currently positioned.
Details |
The CURFLD function returns the name of the field FRAME or PROGRAM entry control on which the cursor is located. If the cursor is not positioned on a window variable, a null string is returned. CURFLD is usually used in conjunction with a CONTROL statement that includes the ENTER, ALWAYS, or ALLCMDS option. You can use CONTROL LABEL to achieve the same result more efficiently. FRAME or PROGRAM entries can also use the _getCurrentName method.
Example |
Use CURFLD to control the behavior of an SCL entry application:
INIT: control enter; return; MAIN: select( curfld() ); when('PHONE') call display('phone.help'); when('EMPLOYEE') call display ('employee.scl'); otherwise; end; return;
This example can be implemented without CURFLD if the program contains a program block that is labeled with the name of the window variable. If the program is in a SCL entry, then the window variables must be of type PUSHBTNC or PUSHBTNN, and the INIT section must contain CONTROL LABEL.
INIT: controllable; return; PHONE: call display('phone.help'); return; EMPLOYEE: call display('employee.scl'); return;
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.