Chapter Contents

Previous

Next
PACKAGE

PACKAGE



Defines a group of classes whose metadata must be recognized by objects defined on the client

Category: Object Oriented


Syntax
Details
Example
See Also

Syntax

PACKAGE package-name<EXTENDS parent-package-name>;
<ITEM-statements>
ENDPACKAGE;

package-name
is the name that you want to assign to the class package. You can specify a name as a one- to four-level name.

parent-package-name
specifies the parent class package of package-name. Parent-package-name can be specified as a one- to four- level name.

ITEM-statements
are the ITEM statements that define the classes need by client objects. See ITEM for more information.


Details

To build client/server applications, class information such as methods and attributes that are defined on the server must be recognized by objects that are defined on the client. The class package block defines a set of classes that are defined by the server. These classes can then be translated (by the WEB/AF proxy wizard or the CREATESCL function, for example) to interface formats and used by client objects to invoke methods and access attributes defined in these classes.

When you compile the entry that contains the PACKAGE block, SCL generates a CLASSPKG entry with the name that you specified in the PACKAGE statement.

No SCL statements, except for the IMPORT statement, are allowed within the SCL entry that contains the PACKAGE block.

Unlike RESOURCE entries, which directly embed class information in the entry, CLASSPKG entries use a reference (or link) to the class name of each of the classes that are defined in the class package block. Therefore, the class package will automatically pick up any changes that are made to the classes.


Example

If you enter the following code into an SCL entry, then issue the SAVECLASS command, SCL generates the entry work.a.a.classpkg.

package work.a.a.classpkg;
   item sashelp.classes.scllist.class;
   item sashelp.classes.format_c.class;
endpackage;
You can use the IMPORT statement to define the searchpath for CLASS references:
import sashelp.classes;
package work.a.a.classpkg;
   item scllist.class;
   item format_c.class;
endpackage;

See Also

ITEM

ENDPACKAGE


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.