Chapter Contents

Previous

Next
CREATESCL

CREATESCL



Writes class or interface information to an SCL entry

Category: Object Oriented


Syntax
Details
Examples
Example 1: Generate CLASS SCL Entry
Example 2: Generate CLASSPKG SCL Entry
Example 3: Generate A Proxy Entry
Example 4: Generate A Series of Proxy Entries
See Also

Syntax

entry-id=CREATESCL(entry-name, scl-entry<,description><,proxy>);

entry-id
contains the identifier that is assigned to the class, interface, or class package. If the class does not exist, entry-id contains 0.

Type: Numeric

entry-name
is the one- to four-level name of the CLASS, INTERFACE, or CLASSPKG catalog entry to load. If entry-name is a one- or two-level name, then the current search path is used to find the CLASS, INTERFACE, or CLASSPKG entry. If the entry was previously loaded, then the same identifier is returned. Otherwise, the entry is loaded from the catalog into the application class list, and the entry identifier is returned in entry-id.

Type: Character

scl-entry
is the one- to four-level name of the SCL entry to be created. If proxy is 1 and entry-name is a CLASSPKG entry, then you can specify a two-level name for scl-entry, and CREATESCL will generate a series of proxy entries for the classes in the class package.

Type: Character

description
is the description of the SCL entry.

Type: Character

proxy
specifies whether CREATSCL should generate proxy entries. The default value of 0 means that CREATESCL will not generate proxy entries.

Specify 1 if you want CREATESCL to generate proxies. If entry-name is a CLASS or an INTERFACE entry, then CREATESCL will generate a proxy entry for the class or interface. If entry-name is a CLASSPKG entry, and scl-entry is a two-level name, then CREATESCL will generate a proxy entry for each of the classes in the package (each class specified in an ITEM statement).

Type: Numeric


Details

CREATESCL writes the class or interface definition that is in entry-name to an SCL entry. The class definition is written to a CLASS or INTERFACE statement block in the SCL entry that is specified in scl-entry.

You can revise the code in scl-entry and use the SAVECLASS command to create a new or revised class/interface. For example, you can use the CREATESCL function to generate a Version 8 class that contains Version 6 class information. You can add the method signatures, scope, and so on, and then generate a new class using the SAVECLASS command. This process is described in Converting Version 6 Non-Visual Classes to Version 8 Classes.

For more information on the SAVECLASS command, see the online Help for SAS/AF software.

For a description of the CLASS and INTERFACE statement syntax that is written to the SCL entry, see CLASS and INTERFACE.


Examples

Example 1: Generate CLASS SCL Entry

Generate the SCL code for SASHELP.CLASSES.CHECKBOX_C.CLASS. Store the SCL code in WORK.A.CHECKBOX_C.SCL:

myClass=CREATESCL('sashelp.classes.checkbox_c.class',
   'work.a.checkbox_c.scl',
   'CheckBox class to convert');

Example 2: Generate CLASSPKG SCL Entry

Generate the SCL code for SASHELP.IOMSAMP.TSTPKG.CLASSPKG. Store the SCL code in WORK.A.B.SCL:

rc = createscl('sashelp.iomsamp.tstpkg.classpkg','work.a.b.scl');

Example 3: Generate A Proxy Entry

Generate a proxy entry for SASHELP.CLASSES.SCLLIST.CLASS.

rc = createscl('sashelp.classes.scllist.class','work.a.c.scl','',1);
The CLASS statement needed to generate the proxy class is stored in WORK.A.C.SCL. If you issue the SAVECLASS command for WORK.A.C.SCL, then SCL will generate the associated proxy class SCLLISTPROXY.CLASS.

Note:   CREATESCL will generate native='/sasprxy:0' for each of the methods defined in the class. Do not modify this method option.  [cautionend]

Example 4: Generate A Series of Proxy Entries

Generate an SCL proxy file for each of the classes specified in SASHELP.IOMSAMP.TSTPKG.CLASSPKG. This class package contains a ITEM statement for these classes:

rc = createscl('sashelp.iomsamp.tstpkg.classpkg','work.a','',1);
This statement creates two SCL entries in the WORK.A catalog: AFTESTTYPESPESPROXY.SCL and SCLLISTPROXY.SCL. These SCL entries contain the CLASS statements needed to generate the proxy classes. If you issue the SAVECLASS command for these SCL entries, SCL will generate the proxy CLASS files.

Note:   CREATESCL will generate native='/sasprxy:0' for each of the methods defined in the class. Do not modify this method option.  [cautionend]

See Also

APPLY

INSTANCE

LOADRES

NOTIFY

SEND

SUPAPPLY

SUPER


Chapter Contents

Previous

Next

Top of Page

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