You can use
SCL to access other entries that you may need for your application, such as frames and
other SCL programs. You can use the DISPLAY routine to invoke another
SAS catalog entry, including FRAME, SCL, CBT, and PROGRAM entries. For example,
call display('sasuser.mycat.myApp.scl');invokes the SCL entry named myApp. The calling program transfers
control to myApp and waits for it to finish processing.
SCL also enables you to pass parameters between different entry types. In general,
any
argument to an SCL function, routine, or
method can be
-
a constant
call display('myFrame.frame', 2);
-
an SCL variable
call display('myApp.scl', myTable);
-
call display('dlg.frame', listBox1.selectedItem);
Character constants, numeric constants, and expressions are passed by value. You can
use any SCL variable to pass parameters by reference to another entry. To use the
DISPLAY function
with a return value, you must include an ENTRY statement in the frame SCL of the called
FRAME entry. For example, consider the following SCL code:
validUser=DISPLAY('password.frame', userid);If PASSWORD.FRAME contained a text entry control named
userPassword in which a user could provide a valid
password, the frame's SCL could contain
/* FRAME SCL for mylib.mycat.password.frame */
entry userid:input:num return=num;
term:
dcl char pwd;
dcl num isValid;
/* Assume that the user ID is validated in some */
/* way to establish a value for the password. */
if userPassword.text = pwd
then isValid=1;
else isValid=2;
return(isValid);
For details on passing parameters to other
SAS catalog entries, see the ENTRY statement in the
SAS Component Language: Reference.